I have successfully created a password input box on a command button however when you type in the password it is all shown until you press enter. Is there any way that i can change the below code so that when typing in my password it changes it to a *?? for example i type my first letter in "s" then when i enter the next letter in the previous one changes to *??
Thanks in advance.
Thanks in advance.
Code:
Private Sub othrps_Click()
'Attached to On Click event of othrps
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 "Operation Cancelled", 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 = "Sugar" Then
DoCmd.OpenForm "frm_other_reports", acNormal
Else
MsgBox "Sorry, you do not have the required permission to access this area", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
Comment