merlynsdad
Programmer
From my opening screen, I'm inserting a password feature for the Administrator on one of the buttons. I want the frmMain to close when frmAdmin opens. Here's the code:
I'm getting an error saying this action can't be carried out wihle processing a form. What did I do wrong?
If the square peg won't fit in the round hole, sand off the corners.
Code:
Private Sub btnAdmin_Enter()
Dim strPW As String
Dim strInput As Variant
strPW = "password"
strInput = InputBox("Enter Administrator password")
If strInput = strPW Then
DoCmd.OpenForm "frmAdmin"
DoCmd.Close acForm, "frmMain"
Else
Exit Sub
End If
End Sub
If the square peg won't fit in the round hole, sand off the corners.