Hi all -
I have an If/Else statement that determines whether or not you are an Admin. I've disabled right click for Users. When they right click, I'd like a message box or hover menu to pop up indicating that the right click has been disabled, and that if they need to copy or paste, they need to use Cntl+C etc. I would love for this to come up ONLY if they have logged in as a user. I have tried all different kinds of code in the Mouse Up event of the form but it just won't work!
Here's the If/Else statement:
If (Username = "User" And Password = "user1") Then
DoCmd.RunCommand acCmdCloseWindow
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.OpenForm "Add New Story", acNormal, "", "", acEdit, acNormal
Beep
MsgBox "You have successfully logged into HomeBase as a user.", vbOKOnly, ""
DoCmd.OpenQuery "Contacts Extended", acViewNormal
ElseIf (Username = "Admin" And Password = "admin1") Then
DoCmd.RunCommand acCmdCloseWindow
DoCmd.OpenForm "Add New Story", acNormal, "", "", acEdit, acNormal
Beep
MsgBox "You have successfully logged in to HomeBase as an admin.", vbOKOnly, ""
DoCmd.SelectObject acTable, , True
'this will enable all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
Next i
Best,
Marisa