Thanks God...at last!!! Hi Tewan.......I am your new subscriber.....that's I am searching for so long....You've discribed the best for this part...I love that!!! Thumbs up & subs... :-)
hey thanks watching this video help me out alot with my current project i am working on in Access. After being familiarized with MS Access i found quite an interest in learning to be MS Access developer. I would like to know where i can get online training or is it possible that i can email you for more information.
Thumb Up **** It help me a lot & it works perfect >> Just question, am trying to do security privilege acces level user - who open what- do you got any video for that. Kind regards
Sir I tried following each and every code but I have a problem here : I am getting a compiled error, where instead after [UserName]", "tblemployees","[UserName]" = ' " ( the compile error is coming from there, it doesn't want to link to the employees table with ' " instead it will only allow " ' " instead of the one you used) I need help please.
Great tutorial. Mine hadn't worked at all - where the confusion came in for me was the naming conventions. In the tutorial for example for the job process: TUTORIAL: If (IsNull(DLookup("UserLogin", >>>> "tblUser"
Why don't you put UserLogin and Password into a single DLookup call? For example: DLookup("UserLogin", "tblUser", "UserLogin = '" & Me.txtLoginID.Value & "' AND Password = '" & Me.txtPassword.Value & "'")
Yes! And by the way it's more safety because it doesn't authorize to validate a Login with another existing password like it's the case with two different "LookUp()". Thanks for the video austin!
Duc, you are the man. my code with two DLookup have bug. using your code with one Dlookup and using And to combine userLoginID and Password to fix problem about login. Thanks Duc.
Nice video. Please note, though, that the code you set up would work for any combination of a valid user + valid password, not for a specific one. In other words, if you correctly guess the username in row 1 of the user/password table, then typing in the correct password for user 4 would suffice.
Hi Austin your videos are helpful. Thank you so much. But I need to ask... 1. Can I create reset-able password, if it is possible can u provide the vba or maybe tutorial vids would help? 2. Can user's login form (page) add in with histories and activities of the users?
Hello Austin, how to hide some fields i data sheet form even the fields setting is visible ... for example employees list form in Northwind 2007 sample data base
Austin I followed your code however the compiler gives an error and highlights the set focus this is the code can you please explain what is wrong If IsNull(Me.txtUsername) Then MsgBox "Please enter Username ", vbInformation, "Login Required" Me.SetFocus ElseIf IsNull(Me.txtPassword) Then MsgBox "Please enter Password ", vbInformation, "Password Required" Me.SetFocus
«SetFocus» event only applies to controls and «Me» represents your form. So, you should replace: Me.SetFocus by Me.control_to_receive_the_focus.SetFocus Ex: Me.Text1.SetFocus
xzktplm here's the code Private Sub Command1_Click() If IsNull(Me.txtUsername) Then MsgBox "Please enter Username ", vbInformation, "Login Required" Me.txtUsername.SetFocus ElseIf IsNull(Me.TxtPassword) Then MsgBox "Please enter Password ", vbInformation, "Password Required" Me.txtPassword.SetFocus If IsNull(DLookup("[Username]", "tblUser", "[Username] ='" & Me.txtUsername.Value & "' And password = '" & Me.TxtPassword.Value & "'")) Then MsgBox "Incorrect Username or Password" Else 'process the job End If End If End Sub
sabrina brown I got no error message. What MS Access version are you working on? I'm working on MS Access 2010 and everything is ok, despite the fact that this code displays unnecessary message boxes. I would rather use this one below; it's more consistent. Note the fact that dots(.) where replaced by bangs(!) between form names and control names. If you still have error messages, post them here. Private Sub Command1_Click() If IsNull(Me!txtUsername) Then MsgBox "Please enter Username ", vbInformation, "Login" Me!txtUsername.SetFocus Exit Sub End If If IsNull(Me!txtPassword) Then MsgBox "Please enter Password ", vbInformation, "Login" Me!txtPassword.SetFocus Exit Sub End If If IsNull(DLookup("[Username]", "tblUser", "[Username] ='" & Me!txtUsername.Value & "' And [password] = '" & Me!txtPassword.Value & "'")) Then MsgBox "Incorrect Username or Password", vbCritical, "Login" Else End If End Sub
I don't understand the part that why are we using if (is Null(Dlookup... shouldn't we be using if its not null than dlookup the values... sorry!! new to this and just not getting the concept to it
IsNull is used for field on the current form. We need to use other functions to compare the entry data on current form to the data in the table. If both entered username and password are matching with the username and password in the User table. we need some functions to verify data in current form and in table. we can use DLookup, Dcount, or Recordset to compare data from two different sources. I used Dlookup. If the result is null (no match) then means incorrect username or password. you can use Dcount like IF DCount (.....) >0 then it means correct user name and password.
I followed the VBA code instructions in this tutorial but found that any password in the database would match with any logon name in the database. Any suggestions?
Hello, seem like you have same issue on different functions. It looks like the Access did not save your code. If you update Access on the Network and already opened by someone else then code is not saved after you close it. If you don't have a Write permission on the network or folder on network then Access does not save your code.
austin72406 hi im using access 2013 and when im at the part for incorrect password it keeps giving me incorrect password even though im typing in the correct password this is my current code: Private Sub Command12_Click() Dim UserLevel As Integer Dim TempPass As String Dim ID As Integer If IsNull(Me.txtUser) Then MsgBox "Please enter Username", vbInformation, "Username Required" Me.txtUser.SetFocus ElseIf IsNull(Me.txtpassword) Then MsgBox "Please enter password", vbInformation, "Password Required" Me.txtpassword.SetFocus Else 'process the job If (IsNull(DLookup("[UserName]", "tblUser", "[UserName] ='" & Me.txtUser.Value & "' And Password = '" & Me.txtpassword.Value & "'"))) Then MsgBox "Incorrect Username or Password" Else 'MsgBox "Welcome" DoCmd.Close acForm, "Login", acSaveNo DoCmd.OpenForm "Navigation Form" End If End If End Sub Please Help me im not sure wat im doing wrong
861joshua What kind of characters are you using for the password? For instance, the «.» on the alphabetic keyboard is different from the «.» on the numeric keyboard. Furthermore, you can only use the property «Value» when a control has the focus. You should use «Me.txtUser» and «Me.txtpassword».
Please note, though, that the code you set up would work for any combination of a valid user + valid password, not for a specific one. It is looking user-id and password separately. Please provide a solution.
Austin, Is there a way to have the form that is being opened after a successful login to a record that pertains to the employee that just logged in by matching their ID key?
Is there a way to get the Login ID and Password box to disappear automatically if the login details are successful and has gone onto the navigation form? As at the current time you have to press "cancel" or close the box. Thanks
I think I have the code for closing login form after correct loginid and password verified. Put DoCmd.Close after the correct loginid and password verified.
if u can help me with this pls access database all fields shows as ( #Deleted ) knowing that this form was perfectly working and this error happened suddenly
This login form had problem, i found that you can use any password exit on the table to login with any user. for example you create a user name abc with password 1234 and user name DEF with pass word 3456, and then in this form you can login to the from with user abc, password 3456. and user name DEF can login with password 1234 or 3456. i see that we need to add some more code to make this form better.
make sure you have code seting LoginID and Password under ONE Dlook up function. your code should be like this: If (IsNull(DLookup("LoginID", "tblworker", "LoginID = '" & Me.txtUserName.Value & "' And password = '" & Me.txtPassword.Value & "'"))) Then MsgBox "Invalid UserName or Password!" Else............................ end if I have corrected this issue on the video Part 3 and also answer under the comment section.
Hello, for me it says syntax error on this line: if(isNull(dlookup("[Empleado_Login]","LOG IN","[LoginID] = '" & Me.txtLoginID.value & "' And password = '" & Me.txtPassword.value & "'"))) Then what is wrong with it? (btw im making it in spanish so thats why instead of userID i used Empleado_login)
UserID field is the primary key field on User table. you should to lookup for the primary key field on the LOG IN table. If the Empleado_Login is the primary key then change "LOG IN" to "[LOG IN]"
Hi, when i click close it says that quit access cannot be used via embedded macro? Also the rest of the code works but if i click save or reopen a previous database it wont work. the only way i get it to work is i import the table and forms into a new database each time. is there a fix for this? Other than that the code works a treat!!
I viewed the video and followed the as instructed but when I closed the MS Access and open it again a dialogue box pops that reads," The form name 1-Login is misspelled or doesn't exist." Can someone assist.
How do you manage to open the record of the user which is logging in? I would like the form to open the record showing the main data of the user, wich is in another schedule as the user data is. And my second question is how can I make certain fields invisible for users and leave visible to admins? Thank you very much for your support! I do not use the navigation form.
Dear Tewan. Very helpful video, I have a problem with Cancel. When I click the Cancel I get the massage: "The 'Quite' macro action cannot run with the specified 'Option' argument either when in disabled mode or when called from an embedded marcro" Help me how to fix!!
ive been trying to save a label but it wont work it resets every time i push the load button?? this is my script: load button: lbl_cash.Text = My.Settings.Savecash lbl_cps.Text = My.Settings.Savecps Save button: My.Settings.Savecash = lbl_cash.Text My.Settings.Savecps = lbl_cps.Text
How to create a lock/unlock button (on the design view of a form) to protect some specific text box, so that some users won't change that specific text box by accident when they are updating other text box in the same form?
Good job on your work! I am creating a multi user login access database (i.e. admin n user). I want to use the login info entered by the user through the login form to give either an Admin or User access. I just need some help with the code. I already have the user and securitylevel tables.
I followed your instructions on creating a Login Form in MS Access 2007-2013 and it worked just fine, but when I try and do the same thing in Access 2007-2010, nothing happens. What am I doing wrong?Thanks!
some feature not working for 2007. what you can do is create form in your 2007 then using the VBA code from my video or website. VBA code is ok with any version.
How can i clear the password that stick to the log in form or password box when user are already successful enter the access but the password are still there so other can easily enter?
Hi Austin, Thanks for the video and it is help me One thing I notice if you put password and disable everything then also people are accessing the database with simple shortcut key, ie Hold+double click then its is disable the password and able to view all the navigation pane and things. If you can help me to control the document in such a way
didnt work correct ....in my user table i have 2 user.. its didnt sence the correct userid or password.. as i have two user id 1- userID=SADANAND and Pass=123456 2-UserID=GORAKH and Pass=000000 if i put userid as GORAKH and Password as 123456 then it will open new form which i select i mean its didnt matter whis user or password will be used
hi there! I really need your help. how can i make the username in the login form to be a case-sensitive? the login form just ignore any uppercases or lowercases and just accept the username is there any solution to this?
there is related information on this link: support.microsoft.com/en-us/kb/209674 and here: answers.microsoft.com/en-us/office/forum/office_2007-access/access-is-access-case-sensitive-with-regard-to/e4ffa621-6e93-48e0-935d-43229bdfab77?auth=1
Hello Sir, i am making a website..And i also made login page and registration page..Will you tell me how will i create a database for it using ms database and how will i connect it to both login page and registration page..
Your explanation is very nice...really i am using the access 2013, all code works well up to validation of id and password. after that i got "type mismatch error" at the userlevel command ... Please help me, I tried many times but me not able to identify exactly problem. Is may possible incorrect data type of tables field... If you found then please send me whole code for this login form.....
hi i need ur help plz.. i want to declare a variable in a moudle but it always gives me an error... i want a value of textbox in one form to be used in other form i appreciate if you could help me on this problem
+austin72406 thanks alot it works finally :) sorry i have another question now am working on (Question Bank) project using access.. i have some problems i wonder if there is a way to contact with you :)) God bless
hello austin72406 I have a database but I need it works on computer A not B i want no one can use it without my permisson whats tha procedures , please help , with my regards
To be honest with you, anyone can get a hold of the users information in tblUser. so, from a security perspective, creating a login window in Ms Access is a useless undertaking. Do it for fun, not in a serious enviroment (a company for example)
you are correct. it is the way how Microsoft created. Access is not a high secure program. It is for simple database with low security for non programmer background. You might need to hide the table and other menu to the user.
Hi, Once I execute the above code, I get a Runtime Error 2185. My password field is text field. Suggestion from Microsoft is that, I should set focus. Can you please guide.
First time creating this login form with new database it works! But after i close it and re-open the database, it doesn't work at all. Nothing happens when i click the login or ok button. Can you help me with this problem ?
Of course i saved the codes before i close it. It happens every time i made a new database and re-open it. I am using Ms Access 2007. Is there any solution for this ?
Please help I get the error message- Run-Time Error '3075': Syntax error (missing operator) in query expression '[UserLogin] ='MyName And Password ='MyPassword". Quoted word for word, no idea if that makes a difference.
Solved it, if anyone else get's this issue you have messed up where you have put Speech marks and Apostrophe's. It's better to just copy what he has in the description and paste it into your code.
I copied the code correctly but, when I type a correct username and use a password from any of the other user's logins I still get an correct message box. Is this happening to anyone else? Help!!!!
Hello, anybody help me, have login form works perfectly but some how even before enter user name and password into pop up login form I am able to move database window (winch is under the login form) on another screen, and go to toolbar and make some changing. Is there something I can do to lock database window under the login form, and not being able to do anything before user name and password are correctly entered?
Hey man, if you're still watching the comments I'd like to ask; I have 3 usernames and a password for each one, but when I log in with username A, I can log in with all 3 passwords even though I should not be able to do that. Person A, Password BBB Person B, Password GGG Person C, Password TTT and when I log in as person A, I can log in with writing BBB or GGG or TTT as the password and it will log me in...
the code was corrected under the video part 3 like If (IsNull(DLookup("username", "tbl_login", "username='" & Me.txtusername.Value & "' And password='" & Me.txtpassword.Text & "'"))) Then Combining username and password under one DLookup
+austin72406 thank you! sorry for not watching all the videos but I honestly did not notice "part 1" in the video so I didnt see other parts, was in a rush :) thanks again, doing a nice job
thank's for the videos i learned lot of things but i have a probleme with the logi, part 1 ; even if i write the right login and right passwd when i clic on ok button the answare is " the password or userid is incorrect" please help thank u
**I hope these comments are still being monitored** I tried your code and I'm getting an error for the first "Me.txt..." I did everything like you did, only I changed "UserID" to "Login Name". It keeps telling me .txtLoginName cannot be found. Please help! This is my first time doing code in Access (I usually do macros). Thanks in advance (and thanks for the vids!)
Michelle Carnahan I figured it out. I had already created my own before I watched this video, so I skipped the first part. When I couldn't figure out this error, I finally just started from the beginning and noticed you named the unbound boxes "txt..." All good now! XD Thanks for the vids!
it depends on how to word it. on this video, it shows the user level as admin, user or guest. you can name it as user level or user type. each level has different access or right.
I believe I've done what it says in the video. I've saved the code and when I open the form and test it, it provides an error messasge: Compile error: Method or data member not found Can you tell me what this means, and what I need to change?
Hi Tewan, I love your videos. After copying this video however I get a compile error: wrong number of arguments or invalid property assignment. Please can you offer any help or advice
can you help me with this error Jet.OLEDB.4.0' provider is not registered on the local machine.. i can't connect with database, windows 7x64 is my OS plssss
I don't really get what you mean in the 2nd part of the description: user " and ' infront of And. Sorry for confusion. Is because using the code in the first part of the description does not completely work, gives me an error. Thanks very much for your atention, and really vids!
Thanks God...at last!!! Hi Tewan.......I am your new subscriber.....that's I am searching for so long....You've discribed the best for this part...I love that!!! Thumbs up & subs... :-)
Excellent and very knowledgeable Video Bro. Thanks
Thanks to teach, you are a good teacher Austin
you're welcome.
can you give me the tutorial for how to split database and install it on more than one computer for real time working online...
please
very nice platform...am enjoying the comments...Austin may God richly bless you...
Thank you for sharing informative videos
After only a few minutes, I like you. Thanks for your help!
Thank you very Much you have assisted me alot i followed you step by step and the job was very okay
Even at 2x speed, this video crawls. However, you sound hilarious at the faster speed. It's otherwise very informative and easy to follow. A+++
hey thanks watching this video help me out alot with my current project i am working on in Access. After being familiarized with MS Access i found quite an interest in learning to be MS Access developer. I would like to know where i can get online training or is it possible that i can email you for more information.
Thanks for the tutorial Tewan! This was very good.
Fine. This content is very excellent. I miss how post this in the site. Thanks a lot..
Great video. I was able to follow along and this was very helpful.
Thumb Up **** It help me a lot & it works perfect >> Just question, am trying to do security privilege acces level user - who open what- do you got any video for that. Kind regards
I have 3 videos starting with video #1 here: ruclips.net/video/gAKmPnAnXSM/видео.html
Great thanks alot
hye can you help me it does'nt work for me
It was very helpful. Thank you
By far the best video I have seen thus far of this kind on youtube! It actually works! Very helpful.
Are you lying habibi get a life
Sir I tried following each and every code but I have a problem here : I am getting a compiled error, where instead after [UserName]", "tblemployees","[UserName]" = ' " ( the compile error is coming from there, it doesn't want to link to the employees table with ' " instead it will only allow " ' " instead of the one you used) I need help please.
As always, Tewan Great video. Thank you so much ;)
Great tutorial. Mine hadn't worked at all - where the confusion came in for me was the naming conventions. In the tutorial for example for the job process:
TUTORIAL: If (IsNull(DLookup("UserLogin", >>>> "tblUser"
The code needs to match with your table or fieldname in your table. The VB under the event procedure is only the structure of how the code works.
Why don't you put UserLogin and Password into a single DLookup call?
For example:
DLookup("UserLogin", "tblUser", "UserLogin = '" & Me.txtLoginID.Value & "' AND Password = '" & Me.txtPassword.Value & "'")
That would work too. Thank you for suggestion.
Yes! And by the way it's more safety because it doesn't authorize to validate a Login with another existing password like it's the case with two different "LookUp()".
Thanks for the video austin!
Duc, you are the man. my code with two DLookup have bug. using your code with one Dlookup and using And to combine userLoginID and Password to fix problem about login. Thanks Duc.
Nice video. Please note, though, that the code you set up would work for any combination of a valid user + valid password, not for a specific one. In other words, if you correctly guess the username in row 1 of the user/password table, then typing in the correct password for user 4 would suffice.
thank you for pointing it out. I have correct it on the 3 or 4th part of my video.
How did you do it
Hi Austin your videos are helpful. Thank you so much. But I need to ask...
1. Can I create reset-able password, if it is possible can u provide the vba or maybe tutorial vids would help?
2. Can user's login form (page) add in with histories and activities of the users?
Great tutorial. Thank you!
Hello Austin, how to hide some fields i data sheet form even the fields setting is visible ... for example employees list form in Northwind 2007 sample data base
you can set the column width = 0 when form is load (On Load event).
for example,
Private Sub Form_Load()
Me.FieldName.ColumnWidth = 0
End Sub
Thank you
Austin I followed your code however the compiler gives an error and highlights the set focus this is the code can you please explain what is wrong
If IsNull(Me.txtUsername) Then
MsgBox "Please enter Username ", vbInformation, "Login Required"
Me.SetFocus
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please enter Password ", vbInformation, "Password Required"
Me.SetFocus
«SetFocus» event only applies to controls and «Me» represents your form. So, you should replace:
Me.SetFocus
by
Me.control_to_receive_the_focus.SetFocus
Ex:
Me.Text1.SetFocus
i tried that it still highlight setfocus saying unidentified method
sabrina brown
Please, paste here all your procedure. Maybe then I can identify what's wrong.
xzktplm
here's the code
Private Sub Command1_Click()
If IsNull(Me.txtUsername) Then
MsgBox "Please enter Username ", vbInformation, "Login Required"
Me.txtUsername.SetFocus
ElseIf IsNull(Me.TxtPassword) Then
MsgBox "Please enter Password ", vbInformation, "Password Required"
Me.txtPassword.SetFocus
If IsNull(DLookup("[Username]", "tblUser", "[Username] ='" & Me.txtUsername.Value & "' And password = '" & Me.TxtPassword.Value & "'")) Then
MsgBox "Incorrect Username or Password"
Else
'process the job
End If
End If
End Sub
sabrina brown I got no error message.
What MS Access version are you working on? I'm working on MS Access 2010 and everything is ok, despite the fact that this code displays unnecessary message boxes. I would rather use this one below; it's more consistent. Note the fact that dots(.) where replaced by bangs(!) between form names and control names. If you still have error messages, post them here.
Private Sub Command1_Click()
If IsNull(Me!txtUsername) Then
MsgBox "Please enter Username ", vbInformation, "Login"
Me!txtUsername.SetFocus
Exit Sub
End If
If IsNull(Me!txtPassword) Then
MsgBox "Please enter Password ", vbInformation, "Login"
Me!txtPassword.SetFocus
Exit Sub
End If
If IsNull(DLookup("[Username]", "tblUser", "[Username] ='" & Me!txtUsername.Value & "' And [password] = '" & Me!txtPassword.Value & "'")) Then
MsgBox "Incorrect Username or Password", vbCritical, "Login"
Else
End If
End Sub
I don't understand the part that why are we using if (is Null(Dlookup... shouldn't we be using if its not null than dlookup the values... sorry!! new to this and just not getting the concept to it
IsNull is used for field on the current form. We need to use other functions to compare the entry data on current form to the data in the table. If both entered username and password are matching with the username and password in the User table. we need some functions to verify data in current form and in table. we can use DLookup, Dcount, or Recordset to compare data from two different sources. I used Dlookup. If the result is null (no match) then means incorrect username or password. you can use Dcount like IF DCount (.....) >0 then it means correct user name and password.
Awesome! Make sense. Thanks.
thanks for your knowledge
can you also give me a tutorial of navigation form.... your tutorial are really very very helpful for me thank you....
I followed the VBA code instructions in this tutorial but found that any password in the database would match with any logon name in the database. Any suggestions?
cant get this to work at all, does that new code replace both d lookups or just the second one
Why when i save my work, then close it.
then after i reopen it!!! its not working anymore!!!
PLEASE HELP HELP ME!!!
Hello, seem like you have same issue on different functions. It looks like the Access did not save your code. If you update Access on the Network and already opened by someone else then code is not saved after you close it. If you don't have a Write permission on the network or folder on network then Access does not save your code.
austin72406 hi im using access 2013 and when im at the part for incorrect password it keeps giving me incorrect password even though im typing in the correct password
this is my current code:
Private Sub Command12_Click()
Dim UserLevel As Integer
Dim TempPass As String
Dim ID As Integer
If IsNull(Me.txtUser) Then
MsgBox "Please enter Username", vbInformation, "Username Required"
Me.txtUser.SetFocus
ElseIf IsNull(Me.txtpassword) Then
MsgBox "Please enter password", vbInformation, "Password Required"
Me.txtpassword.SetFocus
Else
'process the job
If (IsNull(DLookup("[UserName]", "tblUser", "[UserName] ='" & Me.txtUser.Value & "' And Password = '" & Me.txtpassword.Value & "'"))) Then
MsgBox "Incorrect Username or Password"
Else
'MsgBox "Welcome"
DoCmd.Close acForm, "Login", acSaveNo
DoCmd.OpenForm "Navigation Form"
End If
End If
End Sub
Please Help me im not sure wat im doing wrong
861joshua What kind of characters are you using for the password? For instance, the «.» on the alphabetic keyboard is different from the «.» on the numeric keyboard.
Furthermore, you can only use the property «Value» when a control has the focus. You should use «Me.txtUser» and «Me.txtpassword».
how to add one more combo column for selecting companies in login form and open main form related to same company name database records.
Please note, though, that the code you set up would work for any combination of a valid user + valid password, not for a specific one. It is looking user-id and password separately. Please provide a solution.
I have corrected the final code on video part 3 or 4.
austin72406
Thanks Sir. I have founded the solution myself.
It was very helpful. thanks for uploading :)
Thank you Tewan this was very helpful and thank you on responding and keeping up with Debugging and Validation.
Kudos!
Austin,
Is there a way to have the form that is being opened after a successful login to a record that pertains to the employee that just logged in by matching their ID key?
It was instructed in the Part 4 of Create Login Form Access Database.
Is there a way to get the Login ID and Password box to disappear automatically if the login details are successful and has gone onto the navigation form? As at the current time you have to press "cancel" or close the box. Thanks
I think I have the code for closing login form after correct loginid and password verified. Put DoCmd.Close after the correct loginid and password verified.
Sir, pls upload videos regarding queries (Cross Query, Append Query etc)
if u can help me with this pls
access database all fields shows as ( #Deleted )
knowing that this form was perfectly working and this error happened suddenly
This login form had problem, i found that you can use any password exit on the table to login with any user. for example you create a user name abc with password 1234 and user name DEF with pass word 3456, and then in this form you can login to the from with user abc, password 3456. and user name DEF can login with password 1234 or 3456.
i see that we need to add some more code to make this form better.
make sure you have code seting LoginID and Password under ONE Dlook up function. your code should be like this: If (IsNull(DLookup("LoginID", "tblworker", "LoginID = '" & Me.txtUserName.Value & "' And password = '" & Me.txtPassword.Value & "'"))) Then MsgBox "Invalid UserName or Password!" Else............................ end if
I have corrected this issue on the video Part 3 and also answer under the comment section.
austin72406 thanks! you're great. i love your video.
Cong Nguy and one more thing, could you add some more code to realize the capital character and non capital for pass word? like H and h.
thanks!
Hello, for me it says syntax error on this line:
if(isNull(dlookup("[Empleado_Login]","LOG IN","[LoginID] = '" & Me.txtLoginID.value & "'
And password = '" & Me.txtPassword.value & "'"))) Then
what is wrong with it? (btw im making it in spanish so thats why instead of userID i used Empleado_login)
UserID field is the primary key field on User table. you should to lookup for the primary key field on the LOG IN table. If the Empleado_Login is the primary key then change "LOG IN" to "[LOG IN]"
I copied the corrected text and still get an error, did anyone get errors too?
Me too .. still error
Thank you so much ! This was so helpful thank you for your time towards helping us all out here. 🙌👍❤
Hi, when i click close it says that quit access cannot be used via embedded macro?
Also the rest of the code works but if i click save or reopen a previous database it wont work. the only way i get it to work is i import the table and forms into a new database each time. is there a fix for this?
Other than that the code works a treat!!
This is a problem for MS Access. each version is not compatible regarding macro or feather.
will it also work, if i will use my database on different computer after splitting database ???
I viewed the video and followed the as instructed but when I closed the MS Access and open it again a dialogue box pops that reads," The form name 1-Login is misspelled or doesn't exist." Can someone assist.
How do you manage to open the record of the user which is logging in? I would like the form to open the record showing the main data of the user, wich is in another schedule as the user data is. And my second question is how can I make certain fields invisible for users and leave visible to admins? Thank you very much for your support! I do not use the navigation form.
You need to create access level for every user, say: administrator, operator and guest.
@@michaelvillanueva2375 , Thank you for your help. Meanwhile I found a solution to implement all of my necessary features to the database.
Dear Tewan, have you got the sample database that contain students information include their score. Or where I can find those example.
Please help
I'm working on it. about 90 % completed. I will upload as soon as it completed.
OMG i need that too!! please please please!! -3- im begging you :3 its my final exam -_- im so fudge up!! just give me a tutorial and all T-T
Oh thanks Tewan! I am waiting for that
I just upload sample for student database at iaccessworld.com
austin72406
Thank you so much Tewan
Thanks brother for replay to me...Thanks..Thanks...Thanks...
If i will need any more help then will you help me ?
sure.
Dear Tewan. Very helpful video, I have a problem with Cancel. When I click the Cancel I get the massage: "The 'Quite' macro action cannot run with the specified 'Option' argument either when in disabled mode or when called from an embedded marcro"
Help me how to fix!!
Cancel button is to Quit the Access file. it using macro as QuitAccess with Option Save all
ive been trying to save a label but it wont work it resets every time i push the load button?? this is my script:
load button:
lbl_cash.Text = My.Settings.Savecash
lbl_cps.Text = My.Settings.Savecps
Save button:
My.Settings.Savecash = lbl_cash.Text
My.Settings.Savecps = lbl_cps.Text
Please tell me that how to generate 3 copies of receipt like (Bank copy, School copy, Student Copy) of one record on one page?
How to create a lock/unlock button (on the design view of a form) to protect some specific text box, so that some users won't change that specific text box by accident when they are updating other text box in the same form?
Use Me.YourFieldName.enabled = false
ny buttons are not responding when I saved and test the codes , help me with this..
Hello Austin,
I have tried the code and its update however, I keep getting the error. What does it mean when you get block if without end if?
you are missing one End If. Please check the the number of End If to match with IF statement.
Thanks, I figured it out
Easy to understand, thanks!
Good job on your work! I am creating a multi user login access database (i.e. admin n user). I want to use the login info entered by the user through the login form to give either an Admin or User access. I just need some help with the code. I already have the user and securitylevel tables.
i stucked to the code with update and no errors but it is not working when try it
Yes i also had an error copy the same thing but still not working for the second user . please help me
I followed your instructions on creating a Login Form in MS Access 2007-2013 and it worked just fine, but when I try and do the same thing in Access 2007-2010, nothing happens. What am I doing wrong?Thanks!
Access has different feature for each version. I created it under the version 2010, it may not work with version 2007.
+austin72406 Okay, do you know of any good tutorials I can use for 2007?
My IT person says that I am using the 2010 version.
some feature not working for 2007. what you can do is create form in your 2007 then using the VBA code from my video or website. VBA code is ok with any version.
Okay, thanks. Is there anyway you could post a screen shot of the final code?
How can i clear the password that stick to the log in form or password box when user are already successful enter the access but the password are still there so other can easily enter?
you can make it Null me.txtpassword =null after code verify userid and password is correct before open navigation form or close the login form.
Hi Austin,
Thanks for the video and it is help me
One thing I notice if you put password and disable everything then also people are accessing the database with simple shortcut key, ie Hold+double click then its is disable the password and able to view all the navigation pane and things. If you can help me to control the document in such a way
I have instructed that method on another video "How to set security or secure database" linke here @watch?v=3ZiqUVVnObY
austin72406 it doesn't work mine.. i try so many time :'( can i text u through email?
didnt work correct ....in my user table i have 2 user.. its didnt sence the correct userid or password.. as i have two user id
1- userID=SADANAND and Pass=123456
2-UserID=GORAKH and Pass=000000
if i put userid as GORAKH and Password as 123456
then it will open new form which i select i mean its didnt matter whis user or password will be used
hi there! I really need your help.
how can i make the username in the login form to be a case-sensitive?
the login form just ignore any uppercases or lowercases and just accept the username
is there any solution to this?
there is related information on this link: support.microsoft.com/en-us/kb/209674
and here: answers.microsoft.com/en-us/office/forum/office_2007-access/access-is-access-case-sensitive-with-regard-to/e4ffa621-6e93-48e0-935d-43229bdfab77?auth=1
Thanks very much.. it helped. :)
Hello Sir,
i am making a website..And i also made login page and registration page..Will you tell me how will i create a database for it using ms database and how will i connect it to both login page and registration page..
Sorry Aniket, I don't have much knowledge about website login database.
Your explanation is very nice...really
i am using the access 2013, all code works well up to validation of id and password.
after that i got "type mismatch error" at the userlevel command ...
Please help me, I tried many times but me not able to identify exactly problem.
Is may possible incorrect data type of tables field...
If you found then please send me whole code for this login form.....
try on changing Dim ID As Integer to "Dim ID As String"
hi austin i have some problem with the login form i made it first time and it works but now im doing your steps again but the thing it does't work
Alrashed Alrashed you
Might have a different version this time then the first time
hi
i need ur help plz..
i want to declare a variable in a moudle but it always gives me an error...
i want a value of textbox in one form to be used in other form
i appreciate if you could help me on this problem
you can use Tempvar. I have How To about Tempvar on my website:
www.iaccessworld.com/how-to-set-temporary-value-tempvars/
+austin72406
thanks alot it works finally :)
sorry i have another question
now am working on (Question Bank) project using access..
i have some problems i wonder if there is a way to contact with you :))
God bless
hello austin72406 I have a database but I need it works on computer A not B i want no one can use it without my permisson whats tha procedures , please help , with my regards
you can use the Login Form with security setting for each user
yes, you are right thanl you for your responce
To be honest with you, anyone can get a hold of the users information in tblUser. so, from a security perspective, creating a login window in Ms Access is a useless undertaking. Do it for fun, not in a serious enviroment (a company for example)
you are correct. it is the way how Microsoft created. Access is not a high secure program. It is for simple database with low security for non programmer background. You might need to hide the table and other menu to the user.
using Win API to check the user login ID is better I think. and no need for the username-password thing
Jonas Sami
Hi,
Once I execute the above code, I get a Runtime Error 2185. My password field is text field. Suggestion from Microsoft is that, I should set focus. Can you please guide.
First time creating this login form with new database it works! But after i close it and re-open the database, it doesn't work at all. Nothing happens when i click the login or ok button. Can you help me with this problem ?
please make sure your code is saved. please review it again.
Of course i saved the codes before i close it.
It happens every time i made a new database and re-open it. I am using Ms Access 2007. Is there any solution for this ?
Please help
I get the error message-
Run-Time Error '3075':
Syntax error (missing operator) in query expression '[UserLogin] ='MyName And Password ='MyPassword".
Quoted word for word, no idea if that makes a difference.
Solved it, if anyone else get's this issue you have messed up where you have put Speech marks and Apostrophe's. It's better to just copy what he has in the description and paste it into your code.
I copied the code correctly but, when I type a correct username and use a password from any of the other user's logins I still get an correct message box. Is this happening to anyone else? Help!!!!
i hope the codes was pasted in description .. HUHU my eyes but im trying hard here (thank you sir )
cant you set it to accept only user1 with user1 password??
I have a problem in If isnull the second one .. how to solve that
Hello, anybody help me, have login form works perfectly but some how even before enter user name and password into pop up login form I am able to move database window (winch is under the login form) on another screen, and go to toolbar and make some changing. Is there something I can do to lock database window under the login form, and not being able to do anything before user name and password are correctly entered?
Hey man, if you're still watching the comments I'd like to ask;
I have 3 usernames and a password for each one, but when I log in with username A, I can log in with all 3 passwords even though I should not be able to do that.
Person A, Password BBB
Person B, Password GGG
Person C, Password TTT
and when I log in as person A, I can log in with writing BBB or GGG or TTT as the password and it will log me in...
the code was corrected under the video part 3 like
If (IsNull(DLookup("username", "tbl_login", "username='" & Me.txtusername.Value & "' And password='" & Me.txtpassword.Text & "'"))) Then
Combining username and password under one DLookup
+austin72406 thank you! sorry for not watching all the videos but I honestly did not notice "part 1" in the video so I didnt see other parts, was in a rush :) thanks again, doing a nice job
thank's for the videos i learned lot of things but i have a probleme with the logi, part 1 ; even if i write the right login and right passwd when i clic on ok button the answare is " the password or userid is incorrect" please help thank u
thank you very much it is useful
Hello have windows XP. On the Top left I don´t have the Option file--> Info. can I encrypt my Access Database with password? and how can I do that?
I should depends on the version of MS Office, not version of Windows.
it accepts capital words but in the record it is not capital why and what should i do?
please ready this article about case sensitive in Access.
en.allexperts.com/q/Using-MS-Access-1440/Create-case-sensitive-password.htm
Hello sir i copied each and every step but my OK button is not responding any thing. Please help me... and tell the solution
I request you to show how to replace Access icon which is represented by letter "A"
Hi Austin
It works well but i just want to close the login form after the user log in to database
!!!!!please help me
you will need to close login form before opening another form.
use : DoCmd.Close
before open another form.
**I hope these comments are still being monitored**
I tried your code and I'm getting an error for the first "Me.txt..." I did everything like you did, only I changed "UserID" to "Login Name". It keeps telling me .txtLoginName cannot be found. Please help! This is my first time doing code in Access (I usually do macros).
Thanks in advance (and thanks for the vids!)
Michelle Carnahan
I figured it out. I had already created my own before I watched this video, so I skipped the first part. When I couldn't figure out this error, I finally just started from the beginning and noticed you named the unbound boxes "txt..." All good now! XD
Thanks for the vids!
hi, i found out that we can close the login form by clicking on the cross button ... How could we solve it ? Urgent
in both login form video and register video, you don't explain USERTYPE. How do you set that up??
Or user security???
it depends on how to word it. on this video, it shows the user level as admin, user or guest. you can name it as user level or user type. each level has different access or right.
I believe I've done what it says in the video. I've saved the code and when I open the form and test it, it provides an error messasge:
Compile error:
Method or data member not found
Can you tell me what this means, and what I need to change?
I'm getting error messages even when I enter the correct email or password.
Hi Tewan,
I love your videos.
After copying this video however I get a compile error: wrong number of arguments or invalid property assignment.
Please can you offer any help or advice
it's hard to tell without seeing the code. can you put your code here?
can you help me with this error
Jet.OLEDB.4.0' provider is not registered on the local machine..
i can't connect with database, windows 7x64 is my OS
plssss
maybe you need an update for MS Access
Cong Nguy is also correct about the password bugs.
I had put the comment/correction code earlier under this video comment section. Also the corrected code is showed under the video part 3
I don't really get what you mean in the 2nd part of the description: user " and ' infront of And. Sorry for confusion. Is because using the code in the first part of the description does not completely work, gives me an error. Thanks very much for your atention, and really vids!
yoo while am creating my command 1 the comp keeps telling me compile error and unexpected combination whatcouldbe the problem
many things can cause an error. check line by line of your code
Everybody that's having a problem with the login needs to change the Or to an And.
ตรงหัว form ทำให้แสดงเวลาปัจจุบัน อย่างไรครับ..?
Run- time error '3463'
Data type mismatch in criteria expression
NEED HELP !!!