Format a dialogue box to act like a password format "****"

  • Thread starter Thread starter Dataduck
  • Start date Start date
D

Dataduck

Using the code below and it works great but I would like the word in the
dialogue box to be hidden with asteriks like a password format so others
cannot see the password. Can someone help me?

Private Sub cmdopenplayers_Click()
'Attached to On Click event of cmdopenplayers

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 = "Golf" Then
DoCmd.OpenForm "Players_Menu_frm", acNormal
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
 
Back
Top