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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top