User ID opens a spacific form

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

Guest

I would like to have a form associated with a User ID so that when the User
signs in the form spacific to his ID opens. For example, I have a Admins
form, a Managers form, and a users form. I would like a user with a managers
log in to have the managers form open when the database opens. When a user
with a Amins log in to have the Admins form open and so on. Is this
possible. Thank you to any help that you can provide.
 
There is sample code in the security FAQ you can use to determine if a user
is a member of a group.
http://support.microsoft.com/?id=207793

You could have a form open on startup (hidden perhaps), that uses the code
and opens the appropriate form
If faq_IsUserInGroup("Admins",CurrentUser) then
DoCmd.OpenForm "name of Admins Form"
ElseIf faq_IsUserInGroup("Managers", CurrentUser) then
DoCmd.OpenForm "name of Managers Form"
Else
DoCmd.OpenForm "Users Form"
End If

You may be able to get away with one form. You can use similar code in the
opening of the one form to hide/disable various controls, or change the
recordsource.
 
Back
Top