Use of Passwords

R

Roger Bell

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
 
S

Scott McDaniel

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
 
S

Scott McDaniel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top