This should be an easy one but I am not 100% sure how to do it.
I have written the following code on a command button to set up a basic password for opening a 'locked switchboard'. What I really want to do is hide the password being typed into the input box with asterix's. Here is the current code and password:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Retry:
Dim strInput As String
strInput = InputBox("Please Enter the Password", "Enter Password")
If strInput = "datapass1" Then
DoCmd.OpenForm "investmentamendmenu1", acNormal
Else
If MsgBox("You entered the wrong password. Do you wish to try again?", vbQuestion + vbYesNo, "Password Error") = vbYes Then
GoTo Retry
End If
End If
Exit_investmentamendmenu1_Click:
Exit Sub
Err_investmentamendmenu1_Click:
MsgBox Err.Description
Resume Exit_investmentamendmenu1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "investmentamendmenu1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
Any ideas on how to modify the code would be great.
Thanks.
I have written the following code on a command button to set up a basic password for opening a 'locked switchboard'. What I really want to do is hide the password being typed into the input box with asterix's. Here is the current code and password:
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Retry:
Dim strInput As String
strInput = InputBox("Please Enter the Password", "Enter Password")
If strInput = "datapass1" Then
DoCmd.OpenForm "investmentamendmenu1", acNormal
Else
If MsgBox("You entered the wrong password. Do you wish to try again?", vbQuestion + vbYesNo, "Password Error") = vbYes Then
GoTo Retry
End If
End If
Exit_investmentamendmenu1_Click:
Exit Sub
Err_investmentamendmenu1_Click:
MsgBox Err.Description
Resume Exit_investmentamendmenu1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "investmentamendmenu1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
Any ideas on how to modify the code would be great.
Thanks.