Looking for DAILY content? Join us on my other channel “Coffee With Steve” for daily videos where we discuss Technology, Software Development, Politics, Culture, and many other things. Coffee With Steve: ua-cam.com/channels/eXAUvo5xxDY_b-lSknPC1A.html
I know im asking randomly but does anyone know of a trick to get back into an Instagram account?? I stupidly lost my account password. I would love any tricks you can offer me
@Kyler Nolan I really appreciate your reply. I found the site thru google and Im trying it out atm. Seems to take quite some time so I will reply here later with my results.
This tutorial was AWESOME. I really appreciate how you explain WHY you're doing things as you're doing them. It's easy to follow and duplicate. THANK YOU!
I'm late to the party here but don't go telling the user if they have got the wrong username or password directly, just send a message that the login credentials are wrong. The way this particular bit of code works informs the 'Hacker' that they have broken the username and he/she/they can now concentrate on the password. So in your code check both username and password in the same pass through then output a message such as 'Incorrect Username/Password Pair' Hey Steve, nice helpful series you've put out here.
I am using different way of security and logging control. Since any one can access to user table if the database stored in not trusted location. Because all VBA and macros are disabled. And ribbon remains visible. Even form modal function doesn’t work and close button remain visible.
This is extremely helpful, and so well explained.. Thanks Steve. It worked first time for me on a charity database where data protection and confidentiality is very important. Great video. Great explanation!
Hi Steve! Perfectly explained and perfect code. Thanks a lot. But I got a small problem. When entering User Name without any password, it also opened. What can I do to solve it? Thanks a lot.
Hi Steve! This is very helpful- simple to follow and you explain the process so well to non-programmers like me. Thank you so much for making my life easier! Kudos! I will watch your other videos as I build my database.
Great video, exceptional Just one issue In the login screen, even if the password field is empty it logs in the user, how can we stop this user must enter password to log in like i want to have a check that if txtpassword is empty it should not log in user and open the frmmain
Hi. Excellent video and explanation. However, you need to add a piece of code for when the password textbox is empty. Add the in the following code above the second IF statement: If IsNull (Me.txtPassword) Then Me.lblWorongPass.Visible = True Me.txtPassword.SetFocus Exit Sub End If Then proceed with the remainder of the code. If this piece of code is left out the log in form will allow anyone who enters a valid username to access the database without knowing the valid password. Again, great video!
lol, i had no idea what you were talking about for the entire length of this video, but i used the code and it worked, so i must have understood some of it, and that's all that matters, thanks.
Excellent video thank you very much! I had a problem getting it to run but it was only because Access had prevented the new content from working - once this protection was removed it worked perfectly. Thought this may help some of the comments below, cheers and Merry Christmas.
Hi Steve, just want to say thank you for this video series. I am currently working through it and it really is great. Easy to understand and follow. You're a lifesaver.
@ Programming: I just can't express how much we can thank you for all your series, really its a lot of helpfull information and tons of appreciations to you sir!
Your information flows like water , I do really enjoy your method and way of providing this knowledge and your way of teaching, Thanks indeed, I appreciate it.
Amazing. Moving from Excel to Access. Very excited, looking forward to learning this. Great instructions. Subscribed, interested in setting up dynamic permissions/views based on each user, and reporting. Thanks for sharing.
Hi Steve! Thank you for your video! I have a problem that once I enter the username correctly and press enter, the programme does not ask me to input any password but it automatically transfers me to the so-called main form. I would like to access the main form only when both the username and password are correct. I am looking forward to hearing from you! Sincerely, Tarik
I had the error 3077. I was able to fix it on my file. I did It like this: rs.FindFirst ("UserName='" & Me.TxtUsername & "'") Hope it may be useful for anyone with that problem.
Two things, the objective of a login is to obscure valid names, not display the names of the users. And NEVER store a password. Store the hash and after the user types in the password, hash it and compare to the stored hash.
Thanks Steve! I ran the code, and it works great. However, I entered the correct Username, but the password I left it blank and I was able to log in without a password.
Hello. I had the same problem so here is the additional code you need to add: Near the top of the code, (under rs.findfirst part) If isnull(your username field on form) or isnull (your password field on form) then Msgbox “enter valid login or password”, vbokonly + vbinformation, “require data” Exit sub End if
Hate to be the bearer of bad news but I tried this step by step and you can still log in using the correct username and by leaving the password field blank, any idea on how to fix this?
I followed your instructions and found that i didn't even need to put the password in my login form for it to log me in. I do have to have the username however. What did I miss?
@@douradavidboge6804 i fixed it already. I applied a condition which makes password field a necessary field and hence user cant press login unless there is something in password.
Great videos, Steve! One refinement that can be made to the code of the login screen is to set the red labels to become invisible by coding it in the OnChange event procedure for txtUserName and txtPassword. This would be in the form of a simple If statement that makes the label invisible if it is visible. That way the labels disappear as soon as the user starts correcting the text in those boxes, hinting to the user that the program knows he is changing the values and they will be re-evaluated the next time he clicks on login. As it is in the video, the user will still see his corrected change being labelled as incorrect until he clicks login and by then the screen already closes before the eye can notice the red label disappearing.
This is fantastic! Thank you so much and thanks for being so thorough. I hope I'll learn how to disable the right click mouse button and still get to design view as the administrator in future videos!
Thank you, great video. Tried according to your instructions and ran into this flaw - If the password is empty and the user name is correct - the user can still log in! This means there is no need to enter the password at all. Kindly suggest a fix
Steve, thanks for the training and the quick responses. In this video you mention disabling the right click menu that can pop up, but its not addressed in this video. Can you either instruct me how to disable the form right-click menu, or direct me to which video contains the info? Thanks!!!!
Enjoyed video 59, even tried to use the USysRibbon, even though my Shift+Open didn't override it so I could turn the options on and off. However I never saw where you addressed the "close" option on top of the tabs of forms, unless changing the tab option to window overlay option was implied but never stated.
This was an issue when I followed the tutorial. I just added this block below the second if statement: If IsNull(Me.txtPassword) = True Then Me.lblWrongPassword.Visible = True Me.txtPassword.SetFocus Exit Sub End If Me.lblWrongPassword.Visible = False
Hi i creat login form just like you creat but when i enter user name and leave empty password field it works and loged me in successfully Please try correct username and empty passwprd field
Hi Steve! 'Hope you're enjoying your time away. In case you do read this . . . First, I have to say thanks for all your hard work on these videos! One thing I found using Access 2010 on Windows 10 . . . I tried the dbOpenSnapshot, but could not get the thing to work in Access 2010. Access 2010 was getting hung at the outset with an "Undeclared variable." So, I just went back to the old method. Perhaps 2013 was "new and improved?" Everything else worked like a charm. I posted the code there, just in case, but there must be something which must be done in 2010 that is missing. Who knows? Perhaps someone caught it below. I caught the fix, btw, on checking the password. Thanks! I have to research it a bit, but is that in case the field is empty? Anyway, if those using Acces 2010, are having a problem with dbOpenSnapshot, use the old from from Recordset #3. That will work just fine. Thanks again, Steve. ' Declare GLOBAL variables Dim db As Database Dim RS As Recordset Private Sub btnLogin_Click() Set db = CurrentDb ' Set RS = db.OpenRecordset("tbl1Employees", dbOpenShapshot, dbReadOnly) Set RS = db.OpenRecordset("tbl1Employees", dbOpenDynaset, dbReadOnly) RS.FindFirst "UserName = '" & Me.txtUserName & "'" If RS.NoMatch = True Then Me.lblerrUserName.Visible = True Me.txtUserName.SetFocus Exit Sub End If Me.lblerrUserName.Visible = False If RS!Password Nz(Me.txtPassword, "") Then Me.lblerrPassword.Visible = True Me.txtPassword.SetFocus Exit Sub End If Me.lblerrPassword.Visible = False MsgBox " Proceed to Process . . ." ' DoCmd.Close acForm, Me.Name ' DoCmd.Close acForm, "frmLogin" End Sub
Just to note, if the password is left blank it still allows people to log in and bypass the password. You also need to add in some code to state if the txtpassword field is null to also return the lblwrongpassword label
Steve, Everything you did here is amazing Thank you! One issue i found is if a user knows a username and they select log in without entering a password it logs the user in. Did I miss a step somewhere to require a password to be entered?
He replied to this problem in the comments , and it works Sharna, you'll see in the comments below and in the pop up bubble during the video that there is a modification to the code to fix this problem. Change If rs!Password Me.txtPassword Then to If rs!Password Nz(Me.txtPassword, "") Then And that will fix it.
Basic Question but now and again, I cant find the words that should be In VBA code "NoMatch and FindFirst are not in the list. can I ask how to add them to the MS Access Database to allow me to use. it is showing error due to these 2 not allowing me to do a basic login form
Your training is the best Ive had so far. I do have a question. I did everything on this video but when I hit login it error back to the module " Dim rs As Recordset" I dont know what can be wrong. It matches yours exactly.
The login form and coding are outstanding, but it has one issue. It just work with the user name . If the user name is correct, it open the another form and no password is required when login button is clicked on. I think this deficiency should be resolved.
Great video; however, I followed all of the step and found that 1) I can log in only the user name and 2) when I re-log in, the login form auto populates the last user name and password. How do I stop this?
Excellent video, very well thought out, very clear and simple progression through all the steps to create a very effective functionality. Nobody could do it better! Many thanks.... David Llewellyn, Paris
I copy the vba codes but it's weird that sometimes it works fine, sometimes it's unable to enter password, (stuck from 2nd digit). I am using Window 10 and Access 2016
When I enter my userID correctly and press enter. It logs me in without putting in a password. If I use the mouse and click in each userID and password. Basically want to force user to ONLY be allowed to use mouse. No ENTER/return. Thanks.
Password field is not case sensitive. I have changed the password field "Allow Autocorrect" = NO. like the other comments suggested. That didn't solve it. Any ideas how to make the password case sensitive?
Thanks for your video tutorials! They always really help me out! Question: Is there a specific reason why you chose to use a recordset instead of the Dlookup Function? Thanks!
Hello Master Bishop; Good effort, It was very nicely explained, you covered almost everything about "Programming in Microsoft Access 2013." You are the best ***** rated! God Bless You and Yours... Thanks for your time,
Your code does not work how its supposed to. Because For this code its enough to enter the proper login without password and it will let the user open form. The password field is not dependent on the login in your case. I've tested this. The code should be changed a little bit differently. Because if the password field is null, the login form lets the user in without entering password. You should include condition like: If IsNull(Me.Passwordfield) Or rs!Password Me.Passwordfield - in this case user will be obliged to fill in the password field.
This is terrific!! Appreciate all your work to bring to us! One Question- All worked well, but when login form opens - default first username form table value is there in Username field? How do I make blank?Thank you- doing all videos --watching now. (Coworkers think I'm smart, but I tell them it's actually Steve Bishop)
I know this an old video but maybe someone can help. I run Win11 with 3 additional monitors and my laptop. The Password dialog works great whn all of the monitors are connected BUT when I open access with only one monitor the dialog box for the password does not go to the primary monitor, it goes to screen 2 which is not connected. Now do I fix this?
Thanks Steve for your wonderful work! I got a question related to temporary values. I would like to add to your code TempVar from column ID, as a number for tables to indicate who made entries to records. I tried to browse the web before bothering you, but my VBA level is still less than basic. Actually, I don't know how to finish this TempVarLogin = ... could you please give me a hint - what function/command I should use to declare (pull) this value from a table?
I wish you could make a series on how to build a database from scratch by breaking down Northwind's Template Database (Or something along those lines), especially the VBA part. I know you really don't like using Macros though because Northwind uses that alot... Just a suggestion.
i am also looking forward to it for steve. he is a good teacher and can easily be understood by begineers. vba using northwind database is a nice teaching instrument to be learned of. anyway, more powers, steve
Have this working fairly well but I would like to some code to handle password changes. What I want to do is open another form to prompt the user for new password and confirmation and then UPDATE the table record with the new password. Opening the form is working well but my UPDATE is not working. Have you covered this in any of your other tutorials?
Hey Steve, when I click login, the error "Compile Error: Method or data member not found" appears, highlighting the line "Private Sub btnLogin_Click()" in yellow. How do I fix this? Thanks
Im only half way through the video but one question has just jumped to mind - what is stopping someone creating a duplicate username and how would you mitigate for this problem?
i want that when i open my access document then login form automatically appears and when user add username and password then he can access to the document. Is it Possible? any body help me?????? Thanks Mansoor Ahmed
yes this is possible. you can go to file-option-current database-display form: (your login form name)-ok make sure you close your microsoft access in order for this to work
when I setup the code as stated in the video, all it takes to log in is getting the username correct. i could type in the correct username and hit the Login button and it will bypass the modal window. Ideas??
I had the same problem. It appears the problem was because the txt box had a NULL value. Therefore it wasn’t executing the IF statement properly. I fixed this by adding an OR statement to he IF condition to catch null as well. Mine looks like this: If IsNull (rs!Password me.txtPassword) Or rs!Password me.txtPassword Then This catches any null returns. Maybe there is a more elegant solution but this worked well for me. Hope it helps you n
Hello Steve. Thanks for All the tutorials on this subject. I setup a login box just like you have and notice, through hitting enter to quickly, that if the UserName is correct the login screen will still allow you into the main form, without checking the password. Only if you enter a password does it check it. Can you help to fix this?
Programming no, actually I got the same bug, it doesn't check for password if the username is correct, both "exit sub" statements are inside both if. I'll be checking again but I'm a beginner to VBA so I may not see where the issue is. I would appreciate if you get this right for us because your videos were extremely helpful and so well explained..
Ran into a problem with this setup i have Access 2010 the section on the user name works perfect but for the password if i leave the field blank it logs me in
nice video, but my code is not giving the results kindly, steve offer me the sample code for this video am trying to follow along but its not working for me.
Hi Steve, thank you for sharing your knowledge!! I have used you code but if the user types their username and leave the password blank it will continue without error, have I done something wrong ??
Sharna, you'll see in the comments below and in the pop up bubble during the video that there is a modification to the code to fix this problem. Change If rs!Password Me.txtPassword Then to If rs!Password Nz(Me.txtPassword, "") Then And that will fix it.
Hi Steve, thanks for the tutorial. It was really helpful. However, i noticed that the password isn't case sensitive. For example, if the stored password is P3teR, i am still able to login with p3ter. How can i fix this? Looking forward to your quick response....many thanks
you simply need to swap the code for the password i.e. swap rs!Password and Me.txtPassword. e.g. should be: If Me.txtPassword rs!Password Or IsNull (Me.txtPassword) Then (Note I added an IsNull; this should fix all the problems!)
I have followed your instructions to the letter, and included the corrections on the 'work file' and 'Eduardo Esteves' ' fix concerning brackets. But I am receiving a run time error '2501' and when Debug is pressed it highlights the: Docmd.OpenForm "frmMain" line showing that there is something wrong with the code on this line. Can you please advise? I can show you further info if you wish.
First, make sure there is a form called frmMain. Second, make sure that the form can open even if it's not called from the login. And if that is all correct, then do a compact and repair on your database. You may have something corrupt.
I am Confused by rs.findfirst method's Criteria.Why is there a single apostrophe in the concatenated Criteria. "UserName=' " & Me.txtUserName & " ' " Why those single apostrophes... Is it not "UserName=" & Me.txtUserName I am new to access vba But I know excel vba....Is my concept of excel vba hindering my understanding of access vba ??? This syntax from MSDN page fulfills my expectation. rstEmployees.FindFirst "HireDate > #" _ & Format(mydate, 'm-d-yy' ) & "#" This I suppose is like... rstEmployees.FindFirst HireDate > #02-14-2015# which is Correct What am I missing ?
Hey Steve, I've made it this far. I was hoping in the VBA section we would be covering some "Import, Append, and Delete Duplicate Records" code (As in all in one shot). I came here based on the import file tut you had created and got hooked on these tuts. Is it not possible? Is it a combination of things (Macros, SQL, and VBA)? I am sorry I am very new to this and have followed your videos thus far and have been able to accomplish all the tuts. Are you able to point me in the right direction or is this further in the videos? Thanks
Looking for DAILY content? Join us on my other channel “Coffee With Steve” for daily videos where we discuss Technology, Software Development, Politics, Culture, and many other things.
Coffee With Steve: ua-cam.com/channels/eXAUvo5xxDY_b-lSknPC1A.html
I know im asking randomly but does anyone know of a trick to get back into an Instagram account??
I stupidly lost my account password. I would love any tricks you can offer me
@Marcos Rene instablaster =)
@Kyler Nolan I really appreciate your reply. I found the site thru google and Im trying it out atm.
Seems to take quite some time so I will reply here later with my results.
@Kyler Nolan It worked and I finally got access to my account again. Im so happy:D
Thanks so much you saved my account :D
@Marcos Rene Happy to help xD
This tutorial was AWESOME. I really appreciate how you explain WHY you're doing things as you're doing them. It's easy to follow and duplicate. THANK YOU!
Hi there, I'm a novice but followed your tutorial and worked first time.... a huge thank you... :)
I'm late to the party here but don't go telling the user if they have got the wrong username or password directly, just send a message that the login credentials are wrong.
The way this particular bit of code works informs the 'Hacker' that they have broken the username and he/she/they can now concentrate on the password.
So in your code check both username and password in the same pass through then output a message such as 'Incorrect Username/Password Pair'
Hey Steve, nice helpful series you've put out here.
Thank you Mr Aitch! Thanks for watching.
This guy make my Job Easier Thanks bro.. Just follow the Steps Carefully 110% it will Work
It's working with wrong password but allow to login if no password entered.
@@mazeem27n Did you Fixed it?
I am using different way of security and logging control. Since any one can access to user table if the database stored in not trusted location. Because all VBA and macros are disabled. And ribbon remains visible. Even form modal function doesn’t work and close button remain visible.
This is extremely helpful, and so well explained.. Thanks Steve. It worked first time for me on a charity database where data protection and confidentiality is very important. Great video. Great explanation!
Hi Steve! Perfectly explained and perfect code. Thanks a lot.
But I got a small problem. When entering User Name without any password, it also opened. What can I do to solve it?
Thanks a lot.
Hi Steve! This is very helpful- simple to follow and you explain the process so well to non-programmers like me. Thank you so much for making my life easier! Kudos! I will watch your other videos as I build my database.
michie i0113 I am so glad you are enjoying the series.
Great video, exceptional
Just one issue
In the login screen, even if the password field is empty it logs in the user, how can we stop this
user must enter password to log in
like i want to have a check that if txtpassword is empty it should not log in user and open the frmmain
Hi. Excellent video and explanation. However, you need to add a piece of code for when the password textbox is empty. Add the in the following code above the second IF statement:
If IsNull (Me.txtPassword) Then
Me.lblWorongPass.Visible = True
Me.txtPassword.SetFocus
Exit Sub
End If
Then proceed with the remainder of the code. If this piece of code is left out the log in form will allow anyone who enters a valid username to access the database without knowing the valid password.
Again, great video!
Adam thank you very much for the help!
lol, i had no idea what you were talking about for the entire length of this video, but i used the code and it worked, so i must have understood some of it, and that's all that matters, thanks.
I would recommend you watch the series in it's entirety then. You will gain much more knowledge about how Access can be useful for you.
Excellent video thank you very much! I had a problem getting it to run but it was only because Access had prevented the new content from working - once this protection was removed it worked perfectly. Thought this may help some of the comments below, cheers and Merry Christmas.
+doggy vlogs how do i remove this protection????
Excellent video man. Looked at a bunch of other videos first and just got confused. This worked for me first time. Thanks!
Hi Steve, just want to say thank you for this video series. I am currently working through it and it really is great. Easy to understand and follow. You're a lifesaver.
Enter correct username and Leave empty password field and enter the button
THIS IS THE BEST! I tried so many steps and websites to get this to work and finally you have helped me and it worked! Thank you so so much!
Excellent teaching video. I plan to watch more of your video series to sharpen my MS Access development skills. Thank you.
@ Programming: I just can't express how much we can thank you for all your series, really its a lot of helpfull information and tons of appreciations to you sir!
Your information flows like water , I do really enjoy your method and way of providing this knowledge and your way of teaching, Thanks indeed, I appreciate it.
u are fire bro, the satisfaction when everything works is unbelievable
Thanks you so much... Sir, you have saved me from being failed in my assignment.
This was so helpful, and thank you for sharing the actual database, I am extremely grateful!!! - JJ
NO WORDS CAN EXPLAIN YOUR GENEROSITY! Thank you so much steve! :-D Looking forward for more videos from you.
Amazing. Moving from Excel to Access. Very excited, looking forward to learning this. Great instructions. Subscribed, interested in setting up dynamic permissions/views based on each user, and reporting. Thanks for sharing.
Hi Steve!
Thank you for your video!
I have a problem that once I enter the username correctly and press enter, the programme does not ask me to input any password but it automatically transfers me to the so-called main form.
I would like to access the main form only when both the username and password are correct.
I am looking forward to hearing from you!
Sincerely,
Tarik
Yes, I am having the same issue. If it has been resolved, please let me know.
I had the error 3077. I was able to fix it on my file.
I did It like this:
rs.FindFirst ("UserName='" & Me.TxtUsername & "'")
Hope it may be useful for anyone with that problem.
You are a freakin god in explaining what and why!! Five thumbs up!
Two things, the objective of a login is to obscure valid names, not display the names of the users.
And NEVER store a password. Store the hash and after the user types in the password, hash it and compare to the stored hash.
Thank you!!!! I had a couple of hiccups but IT WORKS!!!
Really helpful. Can't wait to watch the other videos. Many thanks!!! :D
Thanks Steve!
I ran the code, and it works great. However, I entered the correct Username, but the password I left it blank and I was able to log in without a password.
Hello. I had the same problem so here is the additional code you need to add:
Near the top of the code, (under rs.findfirst part)
If isnull(your username field on form) or isnull (your password field on form) then
Msgbox “enter valid login or password”, vbokonly + vbinformation, “require data”
Exit sub
End if
Hate to be the bearer of bad news but I tried this step by step and you can still log in using the correct username and by leaving the password field blank, any idea on how to fix this?
I followed your instructions and found that i didn't even need to put the password in my login form for it to log me in. I do have to have the username however. What did I miss?
Same for me. No password required to login. lol
Same here, I hope steeve can see this, its almost perfect.
@@jungjungdelosreyes4147 could you post your code. I might help you out
@@KKS.22 Could you post your code, i think i can help
@@douradavidboge6804 i fixed it already. I applied a condition which makes password field a necessary field and hence user cant press login unless there is something in password.
Great videos, Steve! One refinement that can be made to the code of the login screen is to set the red labels to become invisible by coding it in the OnChange event procedure for txtUserName and txtPassword. This would be in the form of a simple If statement that makes the label invisible if it is visible. That way the labels disappear as soon as the user starts correcting the text in those boxes, hinting to the user that the program knows he is changing the values and they will be re-evaluated the next time he clicks on login.
As it is in the video, the user will still see his corrected change being labelled as incorrect until he clicks login and by then the screen already closes before the eye can notice the red label disappearing.
+Caribbean Man Not a bad idea.
+Caribbean Man
Wow! Thats great! I have tried it. :-D Thanks man.
could you give me the code for the on change event procedure please
This is fantastic! Thank you so much and thanks for being so thorough. I hope I'll learn how to disable the right click mouse button and still get to design view as the administrator in future videos!
+De Napoleon You do learn this a bit later.
Thank you, great video. Tried according to your instructions and ran into this flaw - If the password is empty and the user name is correct - the user can still log in! This means there is no need to enter the password at all. Kindly suggest a fix
Steve, thanks for the training and the quick responses. In this video you mention disabling the right click menu that can pop up, but its not addressed in this video. Can you either instruct me how to disable the form right-click menu, or direct me to which video contains the info? Thanks!!!!
You'll learn more about this in video 59.
Enjoyed video 59, even tried to use the USysRibbon, even though my Shift+Open didn't override it so I could turn the options on and off. However I never saw where you addressed the "close" option on top of the tabs of forms, unless changing the tab option to window overlay option was implied but never stated.
You found the solution there to a question I didn't think of when I was making the video. You do need to turn off the tabs.
Thanks Steve, big fan of you work. By the way, if I were to leave the TxtPassword field blank, does it pass through the code and open the form?
This was an issue when I followed the tutorial.
I just added this block below the second if statement:
If IsNull(Me.txtPassword) = True Then
Me.lblWrongPassword.Visible = True
Me.txtPassword.SetFocus
Exit Sub
End If
Me.lblWrongPassword.Visible = False
I did this but and getting “complie error method or data member not found” I also don’t have the “immediate” box on the coding screen.
Hi i creat login form just like you creat but when i enter user name and leave empty password field it works and loged me in successfully
Please try correct username and empty passwprd field
Amazing Steve! had an issue but it seems to be resolved below. yay!!!!
Hi Steve! 'Hope you're enjoying your time away. In case you do read this . . . First, I have to say thanks for all your hard work on these videos!
One thing I found using Access 2010 on Windows 10 . . .
I tried the dbOpenSnapshot, but could not get the thing to work in Access 2010. Access 2010 was getting hung at the outset with an "Undeclared variable." So, I just went back to the old method. Perhaps 2013 was "new and improved?" Everything else worked like a charm.
I posted the code there, just in case, but there must be something which must be done in 2010 that is missing. Who knows? Perhaps someone caught it below.
I caught the fix, btw, on checking the password. Thanks! I have to research it a bit, but is that in case the field is empty? Anyway, if those using Acces 2010, are having a problem with dbOpenSnapshot, use the old from from Recordset #3. That will work just fine.
Thanks again, Steve.
' Declare GLOBAL variables
Dim db As Database
Dim RS As Recordset
Private Sub btnLogin_Click()
Set db = CurrentDb
' Set RS = db.OpenRecordset("tbl1Employees", dbOpenShapshot, dbReadOnly)
Set RS = db.OpenRecordset("tbl1Employees", dbOpenDynaset, dbReadOnly)
RS.FindFirst "UserName = '" & Me.txtUserName & "'"
If RS.NoMatch = True Then
Me.lblerrUserName.Visible = True
Me.txtUserName.SetFocus
Exit Sub
End If
Me.lblerrUserName.Visible = False
If RS!Password Nz(Me.txtPassword, "") Then
Me.lblerrPassword.Visible = True
Me.txtPassword.SetFocus
Exit Sub
End If
Me.lblerrPassword.Visible = False
MsgBox " Proceed to Process . . ."
' DoCmd.Close acForm, Me.Name
' DoCmd.Close acForm, "frmLogin"
End Sub
Just to note, if the password is left blank it still allows people to log in and bypass the password.
You also need to add in some code to state if the txtpassword field is null to also return the lblwrongpassword label
exactly
Steve,
Everything you did here is amazing Thank you! One issue i found is if a user knows a username and they select log in without entering a password it logs the user in. Did I miss a step somewhere to require a password to be entered?
Got the same thing
Same, wasn't sure if I was the only one
He replied to this problem in the comments , and it works
Sharna, you'll see in the comments below and in the pop up bubble during the video that there is a modification to the code to fix this problem.
Change If rs!Password Me.txtPassword Then
to
If rs!Password Nz(Me.txtPassword, "") Then
And that will fix it.
Basic Question but now and again, I cant find the words that should be In VBA code "NoMatch and FindFirst are not in the list. can I ask how to add them to the MS Access Database to allow me to use. it is showing error due to these 2 not allowing me to do a basic login form
I got answer in video link provided in description but what about case-sensitive password.
great video. however if if the password is left blank it still allows people to log in and bypass the password.
i'm trying to make a modern professional LOGIN form, with a lot of new features like inactivity logout, can you please help me in that
Your training is the best Ive had so far. I do have a question. I did everything on this video but when I hit login it error back to the module " Dim rs As Recordset" I dont know what can be wrong. It matches yours exactly.
The login form and coding are outstanding, but it has one issue. It just work with the user name . If the user name is correct, it open the another form and no password is required when login button is clicked on. I think this deficiency should be resolved.
Its so fun when i type in as you said, and you deleted it when i finish typing hahahaha
Great video; however, I followed all of the step and found that 1) I can log in only the user name and 2) when I re-log in, the login form auto populates the last user name and password. How do I stop this?
I like your video very much. It's really great. I'll keep an eye on your channel. I am your fan and I will support you.
Excellent video, very well thought out, very clear and simple progression through all the steps to create a very effective functionality. Nobody could do it better! Many thanks.... David Llewellyn, Paris
I copy the vba codes but it's weird that sometimes it works fine, sometimes it's unable to enter password, (stuck from 2nd digit). I am using Window 10 and Access 2016
Thank you sir. Very helpful and lots of information. Also very clear explanation that makes it easy to follow the video
is there anyway for the login screen to only show,not the window behind
I accidentaly disabled the input option, now I cant access the form because everyting is blocked and I cant login. How to solve this problem? Thanks
You are the best guy out here. My RESPECT brother.
Hello im geting this error "variable not defined and Private Sub btnLogin_Click() is in Yellow can you help me with this problem .
You sir are a helping angle!! Thank you for your effort!! helped me a lot, and I really appreciate it.
When I enter my userID correctly and press enter. It logs me in without putting in a password. If I use the mouse and click in each userID and password. Basically want to force user to ONLY be allowed to use mouse. No ENTER/return. Thanks.
Password field is not case sensitive. I have changed the password field "Allow Autocorrect" = NO. like the other comments suggested. That didn't solve it. Any ideas how to make the password case sensitive?
Thanks for your video tutorials! They always really help me out! Question: Is there a specific reason why you chose to use a recordset instead of the Dlookup Function? Thanks!
Hello Master Bishop;
Good effort, It was very nicely explained, you covered almost everything about "Programming in Microsoft Access 2013."
You are the best ***** rated!
God Bless You and Yours...
Thanks for your time,
Thank you for your kind words.
Your code does not work how its supposed to. Because For this code its enough to enter the proper login without password and it will let the user open form. The password field is not dependent on the login in your case. I've tested this. The code should be changed a little bit differently. Because if the password field is null, the login form lets the user in without entering password. You should include condition like: If IsNull(Me.Passwordfield) Or rs!Password Me.Passwordfield - in this case user will be obliged to fill in the password field.
Yeahhh I sort it out..just add one more condition like you said...thx a ton! 😉😉😉
I am using 2016 Access. When I make the from modal/popup and remove the control, I can no longer close or edit this form.
Thanksss! It worked!! And I like it how you described and explained each detail. :D
This is terrific!! Appreciate all your work to bring to us! One Question- All worked well, but when login form opens - default first username form table value is there in Username field? How do I make blank?Thank you- doing all videos --watching now. (Coworkers think I'm smart, but I tell them it's actually Steve Bishop)
+ejfancathy set the default value to null.
+Programming The table filed value or the form field value- have tried both? Thank you!
I don't understand what you mean.
I know this an old video but maybe someone can help. I run Win11 with 3 additional monitors and my laptop. The Password dialog works great whn all of the monitors are connected BUT when I open access with only one monitor the dialog box for the password does not go to the primary monitor, it goes to screen 2 which is not connected. Now do I fix this?
I forgot to ask one question. You didn't finish illustrating how to disable the "right click" options on the login screen.
1. reopen login form in design view 2. in form property sheet, go to "other" tab 3. change "shortcut menu" to no
I keep getting this error message
does compile error ( User-define type not define)
what does that mean
The form crested using this procedure opens even when you have not written anything
Thanks a lot for this great video, very simple and understanding. Keep doing your great supporting Job
Thank you!
Thanks Steve for your wonderful work!
I got a question related to temporary values. I would like to add to your code TempVar from column ID, as a number for tables to indicate who made entries to records. I tried to browse the web before bothering you, but my VBA level is still less than basic. Actually, I don't know how to finish this TempVarLogin = ... could you please give me a hint - what function/command I should use to declare (pull) this value from a table?
I wish you could make a series on how to build a database from scratch by breaking down Northwind's Template Database (Or something along those lines), especially the VBA part. I know you really don't like using Macros though because Northwind uses that alot... Just a suggestion.
i am also looking forward to it for steve. he is a good teacher and can easily be understood by begineers. vba using northwind database is a nice teaching instrument to be learned of. anyway, more powers, steve
Thanks for this , much appreciated. However, if you leave both Username and Password textboxes empty, the system allows you to Log in
Have this working fairly well but I would like to some code to handle password changes. What I want to do is open another form to prompt the user for new password and confirmation and then UPDATE the table record with the new password. Opening the form is working well but my UPDATE is not working. Have you covered this in any of your other tutorials?
Steve, I can open frmMain with correct username and without entering password.
Hey Steve, when I click login, the error "Compile Error: Method or data member not found" appears, highlighting the line "Private Sub btnLogin_Click()" in yellow. How do I fix this? Thanks
same issue and still can't resolve it
egotisticalbastrd you sir are an amazing human being ... god bless your soul
Hi Steve, i'm using Access 2016 and it doesn't recognize the "Recordset"object - what can i use instead?
never mind i saw your chat below w/Kevin Willemse where you explain the issue.
Im only half way through the video but one question has just jumped to mind - what is stopping someone creating a duplicate username and how would you mitigate for this problem?
You have to manage that with other things not discussed in this video. I do cover securing your database later in the series.
i want that when i open my access document then login form automatically appears
and when user add username and password then he can access to the document.
Is it Possible?
any body help me??????
Thanks
Mansoor Ahmed
yes this is possible. you can go to file-option-current database-display form: (your login form name)-ok
make sure you close your microsoft access in order for this to work
when I setup the code as stated in the video, all it takes to log in is getting the username correct. i could type in the correct username and hit the Login button and it will bypass the modal window. Ideas??
I had the same problem. It appears the problem was because the txt box had a NULL value. Therefore it wasn’t executing the IF statement properly. I fixed this by adding an OR statement to he IF condition to catch null as well.
Mine looks like this:
If IsNull (rs!Password me.txtPassword) Or rs!Password me.txtPassword Then
This catches any null returns. Maybe there is a more elegant solution but this worked well for me. Hope it helps you n
@@Hubiy2000 Your solution works well; thank you
You dah man Steve!
Hello Steve. Thanks for All the tutorials on this subject. I setup a login box just like you have and notice, through hitting enter to quickly, that if the UserName is correct the login screen will still allow you into the main form, without checking the password. Only if you enter a password does it check it. Can you help to fix this?
Make sure you have the "Exit Sub" statement inside the scopes of both IF statements. It sounds like you're missing it at the password check.
Programming
no, actually I got the same bug, it doesn't check for password if the username is correct, both "exit sub" statements are inside both if. I'll be checking again but I'm a beginner to VBA so I may not see where the issue is. I would appreciate if you get this right for us because your videos were extremely helpful and so well explained..
Ran into a problem with this setup i have Access 2010 the section on the user name works perfect but for the password if i leave the field blank it logs me in
nice video, but my code is not giving the results kindly, steve offer me the sample code for this video am trying to follow along but its not working for me.
Great tutorial. Is there any way to encrypt password column?
Hi Steve,
thank you for sharing your knowledge!! I have used you code but if the user types their username and leave the password blank it will continue without error, have I done something wrong ??
Sharna, you'll see in the comments below and in the pop up bubble during the video that there is a modification to the code to fix this problem.
Change If rs!Password Me.txtPassword Then
to
If rs!Password Nz(Me.txtPassword, "") Then
And that will fix it.
thanks
@@ProgrammingMadeEZ Thank you sir, I am really worried about it, now its done !!
Hi Steve, thanks for the tutorial. It was really helpful.
However, i noticed that the password isn't case sensitive.
For example, if the stored password is P3teR, i am still able to login with p3ter.
How can i fix this? Looking forward to your quick response....many thanks
I have the same issue but it is also for the Username
you simply need to swap the code for the password i.e. swap rs!Password and Me.txtPassword. e.g. should be:
If Me.txtPassword rs!Password Or IsNull (Me.txtPassword) Then
(Note I added an IsNull; this should fix all the problems!)
I have followed your instructions to the letter, and included the corrections on the 'work file' and 'Eduardo Esteves' ' fix concerning brackets. But I am receiving a run time error '2501' and when Debug is pressed it highlights the:
Docmd.OpenForm "frmMain"
line showing that there is something wrong with the code on this line. Can you please advise? I can show you further info if you wish.
First, make sure there is a form called frmMain. Second, make sure that the form can open even if it's not called from the login. And if that is all correct, then do a compact and repair on your database. You may have something corrupt.
Where can I find the concatenation sign on my keyboard?
I am Confused by rs.findfirst method's Criteria.Why is there a single apostrophe in the concatenated Criteria. "UserName=' " & Me.txtUserName & " ' "
Why those single apostrophes... Is it not "UserName=" & Me.txtUserName
I am new to access vba But I know excel vba....Is my concept of excel vba hindering my understanding of access vba ???
This syntax from MSDN page fulfills my expectation.
rstEmployees.FindFirst "HireDate > #" _
& Format(mydate, 'm-d-yy' ) & "#"
This I suppose is like...
rstEmployees.FindFirst HireDate > #02-14-2015#
which is Correct
What am I missing ?
Thanks for your tips, you area good teacher Steve
Thank you!
Hey Steve, I've made it this far. I was hoping in the VBA section we would be covering some "Import, Append, and Delete Duplicate Records" code (As in all in one shot). I came here based on the import file tut you had created and got hooked on these tuts. Is it not possible? Is it a combination of things (Macros, SQL, and VBA)? I am sorry I am very new to this and have followed your videos thus far and have been able to accomplish all the tuts. Are you able to point me in the right direction or is this further in the videos? Thanks
I cant compile. Private sub login_click() is highlighed in yellow and in the findfirst row. Me.txtusername is highlighted in blue. Pls help!
great videos, now what is the best way to access the DBMS in my website or over the internet?
please extend on how to login with windows authentication