Help with Password protected form...

B

Brook

good day,

I have frmorders that I have one command button to open in Edit mode with
a password and another command button to open in preview only.

the following is my code for my password:

--- Begin Code ---
Private Sub Command10_Click()


Dim strPasswd

strPasswd = InputBox("Enter Password", "Restricted Form")

'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.

If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If

'If correct password is entered open Orders form
'If incorrect password entered give message and exit sub

If strPasswd = "alpha" Then
DoCmd.OpenForm "frmorders", acNormal
Else
MsgBox "Sorry, you do not have access to this form", vbOKOnly, "Important
Information"
Exit Sub
End If
End Sub

--- end code ---

What I would like to do/have is the password set up to only show " * "
astrix instead of the password... how is this possible?

thanks in advance..

Brook
 
R

Rick B

You would have to have an unbound form with the field using a password input
mask.

A bigger question though, is why do this? What prevents your users from
going straight to the table and modifying the data? What keeps them from
looking at your code and reading your password? What prevents them from
opening a query or creating a new query to update the data?

This is generally a bad idea. Instead, implement user-level security and
only give the appropriate access. If the user can modify the data, give
them access to, don't make them type in a password.
 
B

Brook

The reason being is that I only want users in my orders department to be able
to modify the order. I have a call center that uses the Read only to help
customers...

Brook
 
M

mscertified

You can detect a user's windows login on application entry and do all this
automatically, no need for passwords.
All you need is a table of authorized logins.

Granted user level security is the ultimate in security but its not for the
faint of heart.

Dorian
 

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