P
PBrown
Alright,
Current situation:
Form: Switchboard
Needed: When Switchboard closes via the top right "X" it
asks for password
A) If "Admin" is entered, the "Editing Switchboard" opens
B) If "" is entered (if the user chooses OK or Cancel
without entering any type of password) the form does
nothing
C) If the wrong password is entered, MesgBox "Incorrect
Password" appears, then goes back to the original form
just as if they clicked "OK" or "Cancel" without typing
anything
D) If "Display" is entered, the form will open to display
view
Also needed is a way so that when the user clicks on
the "Quit" button, the pop up password box for Switchboard
does not appear. And the database closes. Here is the
code I have so far:
Private Sub Form_Close()
Dim isgm As String
isgm = InputBox("Restricted Area: Enter Password")
If UCase(isgm) = "ADMIN" Then
DoCmd.OpenForm "Editing Switchboard", , , , , , ""
End If
End Sub
I was planning to insert the following lines right before
End if:
ElseIf UCase (isgm) = "" Then
DoCmd.OpenForm "Switchboard", , , , , ,""
However if I do this before finding a way to be able to
get to design view, I will be locked out because by
clicking OK or Cancel, it simply goes back to the form. (I
know this by experience, I had to delete "Switchboard" and
start over because of this "Lock out")
Thank you for any and all help,
PBrown
Current situation:
Form: Switchboard
Needed: When Switchboard closes via the top right "X" it
asks for password
A) If "Admin" is entered, the "Editing Switchboard" opens
B) If "" is entered (if the user chooses OK or Cancel
without entering any type of password) the form does
nothing
C) If the wrong password is entered, MesgBox "Incorrect
Password" appears, then goes back to the original form
just as if they clicked "OK" or "Cancel" without typing
anything
D) If "Display" is entered, the form will open to display
view
Also needed is a way so that when the user clicks on
the "Quit" button, the pop up password box for Switchboard
does not appear. And the database closes. Here is the
code I have so far:
Private Sub Form_Close()
Dim isgm As String
isgm = InputBox("Restricted Area: Enter Password")
If UCase(isgm) = "ADMIN" Then
DoCmd.OpenForm "Editing Switchboard", , , , , , ""
End If
End Sub
I was planning to insert the following lines right before
End if:
ElseIf UCase (isgm) = "" Then
DoCmd.OpenForm "Switchboard", , , , , ,""
However if I do this before finding a way to be able to
get to design view, I will be locked out because by
clicking OK or Cancel, it simply goes back to the form. (I
know this by experience, I had to delete "Switchboard" and
start over because of this "Lock out")
Thank you for any and all help,
PBrown