accessfever
Registered User.
- Local time
- Today, 15:46
- Joined
- Feb 7, 2010
- Messages
- 101
Hi I wanted to create a simple start up screen so user is required to enter a password then hit Enter key. The VBA codes then determines if the entered password is matched or not. If matched, then the start up screen will be closed and the switchboard is opened. If not matched, then a message of "the password is not correct" is displayed and exit the db. However, it seems like my codes are not correct:
Private Sub PassWd_Enter()
Dim intUserResponse As String
intUserResponse = PassWd.Text
If intUserResponse = "PasswordABC!" Then
DoCmd.Close
DoCmd.OpenForm ("Switchboard")
DoCmd.Maximize
Else
DoCmd.Close
DoCmd.Quit
End If
End Sub
Any help is appreciated!
Private Sub PassWd_Enter()
Dim intUserResponse As String
intUserResponse = PassWd.Text
If intUserResponse = "PasswordABC!" Then
DoCmd.Close
DoCmd.OpenForm ("Switchboard")
DoCmd.Maximize
Else
DoCmd.Close
DoCmd.Quit
End If
End Sub
Any help is appreciated!