Hi Everyone,
The code below is on a button which opens a table when the password is entered. I need to mask the password
as it is being typed in the dialog box if someone could help me with that please.
Thank you!
The code below is on a button which opens a table when the password is entered. I need to mask the password
as it is being typed in the dialog box if someone could help me with that please.
Thank you!
Code:
Private Sub Command58_Click()
'Attached to On Click event of cmdOpenDepartmentTable
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 Departments table
'If incorrect password entered give message and exit sub
If strPasswd = "DSR" Then
DoCmd.OpenTable "Departments", acNormal
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
Last edited: