Hi Guys,
I have wrote some VBA for a button that requires a password to enter another form, i have been asked then the users enters the password it need to astrixed out as they type it in.
is this possible and how.
My code below:
Private Sub Administrator_btn_Click()
'Attached to On Click event of cmdOpenAdministrator_frm
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
'If correct password is entered open Employees form
'If incorrect password entered give message and exit sub
If strPasswd = "broadway321" Then
DoCmd.OpenForm "Administrator_frm", acNormal
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
DoCmd.Close acForm, "HomePage_frm"
End Sub