Locopete99
Registered User.
- Local time
- Today, 14:09
- Joined
- Jul 11, 2016
- Messages
- 163
Hi Guys,
I have a database with multiple main menus.
this is across 3 different departments,and depending on your job depends on the main menu you can access.
I'm working on a log in screen that will read your username and will open the main menu for your access level.
I have a table called "users" which has 3 fields, ID, Username and Department.
The department holds the ID for the department the user is assigned to.
My Dlookup to find this departmet ID is giving me run time error 2471.
It says:
"The expression you entered as a query parameter produced this error:
and then gives me the username from fOSUserName.
I have a database with multiple main menus.
this is across 3 different departments,and depending on your job depends on the main menu you can access.
I'm working on a log in screen that will read your username and will open the main menu for your access level.
I have a table called "users" which has 3 fields, ID, Username and Department.
The department holds the ID for the department the user is assigned to.
My Dlookup to find this departmet ID is giving me run time error 2471.
It says:
"The expression you entered as a query parameter produced this error:
and then gives me the username from fOSUserName.
Code:
Private Sub Label0_Click()
Dim User As String
Dim department1 As String
User = fOSUserName
department1 = DLookup("[Department]", "Tbl_Users", "[username] = " & User)
End Sub