Is bit possible to protect a switchboard button with a password?
ie: switchboard1, item no2, command1, argument4.
So when a user navigates to that switchboard button they will be prompted for a password.
Try this code in the Switchboard code.
Suppose you want to protect the button that gave you a menu named 'Top Secret' that would have a switchboard ID, lets say it is 20 (you will have to find this out for yourself by viewing the data list for the switchboard and placing the 'switchboardId' field on your switchboard.
Private Sub Form_Current()
' Update the caption and fill in the list of options.
Me.Caption = Nz(Me![ItemText], "")
If Me.SwitchboardID = 20 Then
Dim x As String
x = "password"
Dim y As String
y = InputBox("Please Enter a Valid Password", "Password required")
If x <> y Then
MsgBox "Wrong password", , "Invalid Password"
'CODE NEEDED TO GO BACK TO THE PREVIOUS SWITCHBOARD ITEM ie SwitchboardId = 4 'Not top secret'
Sorry not sure how to go back to the previous switchboard item in code.