I have a login form which users DLookup to get the password and username from a table called tblStaff
I also have a field in that table called "SecurityLevel"
If the users log in correctly this will go to the main menu
I want to be able to make buttons visible or not visible depending on user security level
I cant get my DLookup function to work on the main menu so it users the correct security level. I can get the currentuser to the main menu but not the security level.
My code is
If DLookup("[SecurityLevel]", "tblStaff", "[StaffID]=[Forms]![frmMainMenu]![CurrentUser]") <> "Administrator" Then
....
Any help please?
I also have a field in that table called "SecurityLevel"
If the users log in correctly this will go to the main menu
I want to be able to make buttons visible or not visible depending on user security level
I cant get my DLookup function to work on the main menu so it users the correct security level. I can get the currentuser to the main menu but not the security level.
My code is
If DLookup("[SecurityLevel]", "tblStaff", "[StaffID]=[Forms]![frmMainMenu]![CurrentUser]") <> "Administrator" Then
....
Any help please?