I have a database set-up that when it's opened it autoexec's a Form. The person inputs the necessary info and must click on two buttons. A checkmark button that inputs the info to a table and populates and fresh form and the other will exit the database and close the program. I have it set that way so no one can access the database tables, queries, etc... I want to add a new button for "Admin" personnel. When clicked I want it to populate for a password and then close the form keeping the database open. After some intense googling and looking on this website I believe I need to set up the button with a code, which I'm new to. The code I found is giving me trouble running. Any input is greatly appreciated. Here's the code:
Code:
Private Sub Command98_Click()
Dim password As Variant
password = Application.InputBox("Please Enter Password", "ADMIN Database")
Select Case password
Case Is = False
'do nothing
Case Is = "password"
DoCmd.Close acForm, "Input Flight"
Case Else
MsgBox "The Password You Entered is Incorrect"
End Select
End Sub