I loved your explanations. you surely have good skills with MS Access. Now how do I do it in Access 2016, for the macros work differently in 2016 after MS made some changes. Also what is the best way to have this RDMS in my website or through the internet?
Sir, in desktop access databases this login form is a ridiculous attempt since everyone can have access to the database if this login form is changed in the display form menu in access option or by unlocking the navigation pane( there is no way to lock the navigation pane permanently in access.) Everyone can have access to tables queries macros forms through the navigation pane.
Which is the video before this one? I watched "Create Login Form Access 2010" part 1,2 and 3, but the code here is different and longer than the ones in the other videos I saw
In the main menu in the form header is my login name it will also be displayed Have then made a table and then a form Now I want the top of the form header of the table also my loginName appears. Is it possible to write it in VBA?
Hi can you create a form wich it can make a contract for costumer and that contract validation must be for two years only ore more and than when we turn on computer the validation will pop up on windows screen? Can you do this form?
Hello Sir, please show me how to protect user to click edit design view on form I want to hide or disable to click desire view or close when we click mouse on right
Hi austin, is it possible to set up this advance security level without creating a navigation page in the first place? Your reply would be greatly appreciated thanks! :)
the main purpose is creating the security level function. I just use the navigation form as example. You can use function to any form on On Load Event.
hi, I have type the coding as show, but it keep show i have problem in my coding which my txtlogin is not valid, however i have set the text name as txtlogin in the form. thank you.
Hi! I get an error if I do't set an Department for admin. If I set a department, how to make that "admin" could see all the departments ? When "DeptName" empty, then an error : "run time error 94. Invalid use of Null '. line : DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ). Allsow I get an error on User = Forms![Navigation form]!txt.Login.value I can't refer to that value in vba, I get an error =null. Thank you
you need to use IF Statement to test if not DepartmentID is not null then process the next step. Example: IF Isnull(DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " )) then ' do nothing Else 'process your code here DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ). End IF
User field has data type as Number because is looked up or linked to the User Type table. the row source of User is like UsertypeID, User Type but access hides the first field (or primary key) and shows only the User type or second field on the row datasource. now it is linked by UsertypeID, not User Type (text).
+austin72406 Hi Asutin The forum attach SQL scripts to speed up the creation of tables and associated indexes. Maybe someone will help to facilitate the work tables in Access. First scripts" create table tblWorker ( WorkerID counter (1,1) CONSTRAINT PK_tblWorker PRIMARY KEY, WorkerName text(50), LoginID text(50), UserType text(50), Password text(50), DeptName text(50));" second SQL script "create table tblDepartment ( DeptID Counter(1,1) CONSTRAINT PK_tbltblDepartment PRIMARY KEY, DeptName text(50));" third SQL script; "Create table tblSecurityLevel ( SecurityID Counter(1,1) CONSTRAINT PK_tblSecurityLevel PRIMARY KEY, SeurityLevel text (50), AccessLevel text (50));" Good and successful work. With best regards. Igor
I am confusing about this code Line: 'Forms![Navigation Form]!Combo52.RowSource = " Select * from tblDepartment Where [deptid] = " & DepartID where is the combo52, I do not seen that in the video? where do you get that from??????????????????????
When I run UserLevel = DLookup("UserSecurity", "tbl_UserLogin", "UserLogin = ' " & Me.txt_username.Value & "'") I get Run-time error 94 "Invalid use of Null", and I have no idea how to fix this, can someone please help?
I have really enjoyed your videos.please assist with the below:Anytime I print from Navigation Form, it prints all the records and will found more than one record on a paper but when I print the Form outside the Navigation Form, it only print one record and that is what I need. Kindly assist
Hello! how to make that "admin" could see all the departments ? When "DeptName" empty, then an error : "run time error 94. Invalid use of Null '. line : DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ). Thank you
I made the similar thing with only 4 level of security - admin, Dermatology, Gastroenterology, Guest but when I run it; access showing error like this " the Expression On CLick you entered as the event property setting prodiced the following Error: User - Defined Type not Defined" the code I use: Option Compare DatabasePrivate Sub Command1_Click() Dim User As String Dim TempPass As String Dim ID As Integer Dim UserName As String Dim TempLogin As String Dim AccessLevel As Integer Dim DepartmentID As IntegerIf IsNull(Me.txtLoginID) Then MsgBox "Please Enter LoginID", vbInformation, "LoginID Required" Me.txtLoginID.SetFocus ElseIf IsNull(Me.txtPassword) Then MsgBox "Please Enter Password", vbInformation, "Password Required" Me.txtPassword.SetFocus Else'process the job If (IsNull(DLookup("LoginID", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'"))) Or (IsNull(DLookup("Password", "tbl_user", "Password = '" & Me.txtPassword.Value & "'"))) Then MsgBox "Incorrect LoginID or Password" Else TempLogin = Me.txtLoginID.Value UserName = DLookup("UserName", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'") TempPass = DLookup("Password", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'") ID = DLookup("UserID", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'") DepartmentID = DLookup("Department", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'") AccessLevel = DLookup("UserSecurity", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'") DoCmd.Close If (TempPass = "password") Then MsgBox "First Login, Please change your password", vbInformation, "New Password Required" DoCmd.OpenForm "UserLoginInfo", , , "[UserID] = " & ID Else DoCmd.OpenForm "Main Menu" Forms![Main Menu]![txtLogin] = TempLogin Forms![Main Menu]![txtSecurity] = AccessLevel Forms![Main Menu]![txtUser] = UserName Call Security(AccessLevel, DepartmentID) End If End If End If End IfEnd SubSub Secutiry(UserLevel As Integer, DepartID As Interger) Select Case UserLevelCase 1 'Admin had full control, no restriction Case 2, 3 ' Dermatology, Gastroenterology - view and edit on their own study Case 4 'Guest - View Only'Me.AllowEdits = True MsgBox " You Logged in as Security Level = User " & DepartmentID = " & DepartID" 'MsgBox (DepartID) Form![Main Menu]!cmdUser.Enabled = FalseEnd SelectEnd Sub
Nice & helpful video
You are the best man, very good. When I'm lost I only look for your videos cos I know you always on point.
Very good, Make a video dynamic report in access
Your materials are wonderful BUT I haven't seen any on Access 2013 , if you have can you share
Best regards
Abdulwahab
Very Helpful thanks a lot!
I loved your explanations. you surely have good skills with MS Access. Now how do I do it in Access 2016, for the macros work differently in 2016 after MS made some changes. Also what is the best way to have this RDMS in my website or through the internet?
Sir, in desktop access databases this login form is a ridiculous attempt since everyone can have access to the database if this login form is changed in the display form menu in access option or by unlocking the navigation pane( there is no way to lock the navigation pane permanently in access.) Everyone can have access to tables queries macros forms through the navigation pane.
nice
I enjoy your teachings but please ,I want access to deduct principal and interest every month from the customer savings account automatically in
Which is the video before this one? I watched "Create Login Form Access 2010" part 1,2 and 3, but the code here is different and longer than the ones in the other videos I saw
this video is for Login with Security Level. another one is for regular login form
Yeah I missed part 4 of the login form. Thanks.
In the main menu in the form header is my login name it will also be displayed
Have then made a table and then a form
Now I want the top of the form header of the table also my loginName appears.
Is it possible to write it in VBA?
Hi can you create a form wich it can make a contract for costumer and that contract validation must be for two years only ore more and than when we turn on computer the validation will pop up on windows screen? Can you do this form?
Hi, Is it possible to use it for a Sinking Fund? I am planning to create a Sinking Fund with these kind of Logins. Thanks!
Hello Sir, please show me how to protect user to click edit design view on form I want to hide or disable to click desire view or close when we click mouse on right
Hi austin, is it possible to set up this advance security level without creating a navigation page in the first place? Your reply would be greatly appreciated thanks! :)
the main purpose is creating the security level function. I just use the navigation form as example. You can use function to any form on On Load Event.
Hi austin, can you help with my error in login. Just a simple error bur i could not figure it out.
hi, I have type the coding as show, but it keep show i have problem in my coding which my txtlogin is not valid, however i have set the text name as txtlogin in the form. thank you.
Hi! I get an error if I do't set an Department for admin. If I set a department, how to make that "admin" could see all the departments ? When "DeptName" empty, then an error : "run time error 94. Invalid use of Null '. line : DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ).
Allsow I get an error on User = Forms![Navigation form]!txt.Login.value
I can't refer to that value in vba, I get an error =null.
Thank you
you need to use IF Statement to test if not DepartmentID is not null then process the next step.
Example:
IF Isnull(DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " )) then
' do nothing
Else
'process your code here
DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ).
End IF
Thanks a lot for sharing this video very helpful.
can you please share the code or send it by email.
is it possible for me to obtain this Access Database as a whole and tweak it for my use?
I have some sample database for sale on my website at www.iaccessworld.com
In the table workers how can i select user type if that field is type number?
User field has data type as Number because is looked up or linked to the User Type table.
the row source of User is like UsertypeID, User Type
but access hides the first field (or primary key) and shows only the User type or second field on the row datasource.
now it is linked by UsertypeID, not User Type (text).
+austin72406 Hi Asutin The forum attach SQL scripts to speed up the creation of tables and
associated indexes. Maybe someone will help to facilitate the work
tables in Access.
First scripts" create table tblWorker (
WorkerID counter (1,1) CONSTRAINT PK_tblWorker PRIMARY KEY,
WorkerName text(50),
LoginID text(50),
UserType text(50),
Password text(50),
DeptName text(50));"
second SQL script
"create table tblDepartment (
DeptID Counter(1,1) CONSTRAINT PK_tbltblDepartment PRIMARY KEY,
DeptName text(50));"
third SQL script;
"Create table tblSecurityLevel (
SecurityID Counter(1,1) CONSTRAINT PK_tblSecurityLevel PRIMARY KEY,
SeurityLevel text (50),
AccessLevel text (50));"
Good and successful work.
With best regards.
Igor
Why can you X out the Login Form and move anywhere?
I am confusing about this code Line: 'Forms![Navigation Form]!Combo52.RowSource = " Select * from tblDepartment Where [deptid] = " & DepartID where is the combo52, I do not seen that in the video? where do you get that from??????????????????????
you just assign the items to your combo box 52 by limiting some items and using only the items(department) that has the [deptID] = DepartID
When I run UserLevel = DLookup("UserSecurity", "tbl_UserLogin", "UserLogin = ' " & Me.txt_username.Value & "'") I get Run-time error 94 "Invalid use of Null", and I have no idea how to fix this, can someone please help?
is it possible to get the copy of your codes easily?,
i have a download file with little of donation at my website : www.iaccessworld.com/download-sample-access-file/
+austin72406 for free?, can't afford to buy your sample database😧😢
you can stop video and copy the code from video. You can see it easily with the 720p video format.
I have really enjoyed your videos.please assist with the below:Anytime I print from Navigation Form, it prints all the records and will found more than one record on a paper but when I print the Form outside the Navigation Form, it only print one record and that is what I need. Kindly assist
you have to use criteria when print report, to print certain or current record.
Hello! how to make that "admin" could see all the departments ? When "DeptName" empty, then an error : "run time error 94. Invalid use of Null '. line : DepartmentID = DLookup (" DeptName "," tblworkerr "," LoginID =' "& Me.txtUserNameLoginID.Value &" ' " ). Thank you
normally, don't set any restriction for Admin. Admin will be outside of these code.
Thanks a lot for this video.
Is it possible to get file which you create in video?
I have a sample file for download with a little cost/support for my work here: www.iaccessworld.com/downloads/login-form-with-advance-security-level/
austin72406 I bought it, but it's shows not recognized data base type
This file was created under the MS Access version 2010. If you have different version then it may have an issue.
How to showing the access level in the txtSecurity as Admin, Guest, Quality Control and other instead of 1,2,3,4,5,6
you can use the Dlookup function like txtSecurity = Dlookup("SecurityLevel","SecurityType table", "[SecurityID] = " 1) example 1 for Admin
✍
This is good but there is no database
is the example file available
yes, at my website here: www.iaccessworld.com/downloads/login-form-with-advance-security-level/
a little contribution is greatly appreciated.
how to show star in password field? ****
under the design view of your table, select Password type for the Input Mask.
okay thanks!
I made the similar thing with only 4 level of security - admin, Dermatology, Gastroenterology, Guest but when I run it; access showing error like this " the Expression On CLick you entered as the event property setting prodiced the following Error: User - Defined Type not Defined" the code I use: Option Compare DatabasePrivate Sub Command1_Click()
Dim User As String
Dim TempPass As String
Dim ID As Integer
Dim UserName As String
Dim TempLogin As String
Dim AccessLevel As Integer
Dim DepartmentID As IntegerIf IsNull(Me.txtLoginID) Then
MsgBox "Please Enter LoginID", vbInformation, "LoginID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please Enter Password", vbInformation, "Password Required"
Me.txtPassword.SetFocus
Else'process the job
If (IsNull(DLookup("LoginID", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'"))) Or (IsNull(DLookup("Password", "tbl_user", "Password = '" & Me.txtPassword.Value & "'"))) Then
MsgBox "Incorrect LoginID or Password"
Else
TempLogin = Me.txtLoginID.Value
UserName = DLookup("UserName", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'")
TempPass = DLookup("Password", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'")
ID = DLookup("UserID", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'")
DepartmentID = DLookup("Department", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'")
AccessLevel = DLookup("UserSecurity", "tbl_user", "LoginID = '" & Me.txtLoginID.Value & "'")
DoCmd.Close
If (TempPass = "password") Then
MsgBox "First Login, Please change your password", vbInformation, "New Password Required"
DoCmd.OpenForm "UserLoginInfo", , , "[UserID] = " & ID
Else
DoCmd.OpenForm "Main Menu"
Forms![Main Menu]![txtLogin] = TempLogin
Forms![Main Menu]![txtSecurity] = AccessLevel
Forms![Main Menu]![txtUser] = UserName
Call Security(AccessLevel, DepartmentID)
End If
End If
End If
End IfEnd SubSub Secutiry(UserLevel As Integer, DepartID As Interger)
Select Case UserLevelCase 1 'Admin had full control, no restriction
Case 2, 3 ' Dermatology, Gastroenterology - view and edit on their own study
Case 4 'Guest - View Only'Me.AllowEdits = True
MsgBox " You Logged in as Security Level = User " & DepartmentID = " & DepartID"
'MsgBox (DepartID)
Form![Main Menu]!cmdUser.Enabled = FalseEnd SelectEnd Sub
you have this: Dim User As String
but never used it in your code
IT having in your video, I Just follow up??????????
Video will not load....
It's loading for everyone. Try again please
hehe
hi austine72406 I am really facing problem with d code I want to in giving d security level how can I get the sample database
i hate videos without source code