Use of Passwords

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a control on a Menu with an 'On click' Event Procedure as follows:
Is there any way that the Password can be typed and appear as xxxxxx etc as
typed to prevent unauthorised users from seeing the actual password typed?

Private Sub ENTER_PG_Click()
On Error GoTo Err_ENTER_PG_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "ENTER PLANNED GIVING"
If InputBox("Please Enter Password") = "1" Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "Sorry, Incorrect Password"
End If
Exit_ENTER_PG_Click:
Exit Sub

Err_ENTER_PG_Click:
MsgBox Err.Description
Resume Exit_ENTER_PG_Click

End Sub

Thanks for any help
 
I have a control on a Menu with an 'On click' Event Procedure as follows:
Is there any way that the Password can be typed and appear as xxxxxx etc as
typed to prevent unauthorised users from seeing the actual password typed?

Not using the Inputbox method. You can build a small form that mimics the INputbox, add a textbox and set the InputMask
to "PASSWORD".


Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Thanks for that Scott. As I am not sure how to go about that, can you assist?

Build a form (frmPassword) with a Textbox (txtPassword) and commandbutton (cmdVerify). In your sub below, call
frmPassword, using the Tag property:

Private Sub ENTER_PG_Click()

'/call frmPassword, and pass the name of the form you want to open in the last argument
'/which is the OpenArgs argument
DoCmd.OpenForm "frmPassword", , , , , , "Enter Planned Giving"

End Sub

Now, on frmPassword, add this code to the cmdVerify:

Sub cmdVerify_Click()

If Me.txtPassword = "1" Then
'/If the password matches, then open the form passed in via
'/the OpenArgs argument
DoCmd.OpenForm Me.OpenArgs
End If

End Sub



Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Back
Top