Changing password code

davey3389

Registered User.
Local time
Today, 10:59
Joined
Jul 16, 2012
Messages
30
I have this code on the form:

Private Sub Command31_Click()
Dim strPassword As String
strPassword = "Test"
If InputBox("Please enter the password") = strPassword Then
DoCmd.OpenForm "frmClient"
Else
MsgBox "Incorrect Password used"
End If
End Sub

Is there anything i can change/add to hide the password as its typed in and also to change the look of the input box

Thanks,

Ben
 
Ben if you want to do this like encryption then you need to create a form with a textbox on it, in the textbox properties you then can name it and also set the format of the property to Password.

The code I gave you can then be adapted to check the contents of the textbox rather than the inputbox and open the form if the contents match or use the message box if it fails.
 
Ok would you be able to send me a copy of the code i need

Thanks
 
See example

Open the frmPassword form the information is there. So Open the form to start with and type in test that will allow you to see the other form. Miss Type and it will give you a message.

The properties of the textbox set the InputMask to PASSWORD.
 

Attachments

Users who are viewing this thread

Back
Top Bottom