Form Options!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been given an interesting challenge....I don't program but I have a
fair knowledge of Access. Here is the scenario:

There are three different menus created, one for the administrator, one for
the supervisor and one for the general worker. The database is already
secured using userIDs and passwords. What I need is this, based on the
userID and password, I need a module that will call up the correct menu. Any
suggestions??? Any help would be appreciated!!
 
Use an autoexec macro to call a function that will open the right form.
Something like,


Function InitializeDB()
Dim strUser as string

strUser=CurrentUser()
If strUser = "Daniel" then
DoCmd.OpenForm "Form1Name"
ElseIf strUser = "Dawne" then
DoCmd.OpenForm "Form2Name"
Elseif strUser = "Shawn" then
DoCmd.OpenForm "Form3Name"
Else
msgbox "Your do not have the right to access this db"
Application.Quit
End if

End Function
 
Back
Top