Is there a way to launch specific forms at login (or after the Splash) depending on user permissions or rights? I am using MS Access 2003. Thanks in advance for any assistance. James
I am still rather new to programming in Access. And that is more advance than where I am at right now. By chance do you have some sample code that I could take a look at?
Have a hidden field on the menu that has the ID of the user.
When the user clicks on the button to open the form:
Code:
With CodeContextObject
If (.FieldUser = 1) Then
DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal
Else
msgbox "You do not have permission."
End If
End With
Have a hidden field on the menu that has the ID of the user.
When the user clicks on the button to open the form:
Code:
With CodeContextObject
If (.FieldUser = 1) Then
DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal
Else
msgbox "You do not have permission."
End If
End With
I apologize that I have not got back to you sooner. My computer crashed and IT has had it for a couple of days now. I just got a loner and have not had a chance to get everything that was backed up restored yet so I have not had a chance to try the code you suggested.
I apologize that I have not got back to you sooner. My computer crashed and IT has had it for a couple of days now. I just got a loner and have not had a chance to get everything that was backed up restored yet so If I can’t get everything restored tomorrow I will have to put this project on hold for a couple days
You could change FieldUser to AccessLevel. So instead of using the user name to restrict, each user has an access level. Forms are restricted by access level.
Form1, From2 and Form3 require access level 2
Form4 and Form5 require access level 6