Password Masking

Saifon

Registered User.
Local time
Today, 01:27
Joined
Mar 7, 2005
Messages
11
Hi Gurus.. :D

Need some wisdom.. ;) I got code behind buttons on my main switchboard form to enable passwords on the buttons.. I use the following code...

Private Sub Option2_Click()
On Error GoTo Err_Option2_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim Password1

Password1 = InputBox("Please Type the Password", "Password Prompt")

If Password1 = "password" Then
stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else

End If

Exit Sub
Exit_Option2_Click:
Exit Sub

Err_Option2_Click:
MsgBox Err.Description
Resume Exit_Option2_Click
End Sub

My issue is that I need to mask the password, I know if it can be done by other methods, such as creating an inputbox on main form and setting the input mask property to Password and useing the button to make this visible.. etc.. However, a little bit of a mess.. the above code is simple and straight forward.. Is there any VB code that I can enter for an input mask for the inputbox :confused:

Hope you can help.. Thanks.. :D
 
Input boxes, as far as I know, cannot be programmed that way. Input mask on a text control is probably the way to go.
 
Input boxes are not the best tool to use in any application.

But, you can format the keyed values in an input box to hide the keyed password with astericks. Check out the code 'Hooks' provided in this link on how to do it... Password Security Management
 
thanks ghudson.. that's a lot of code, but done the trick.. thanx again... :D
 

Users who are viewing this thread

Back
Top Bottom