Password a single field

teresap

Registered User.
Local time
Today, 03:38
Joined
Mar 6, 2004
Messages
13
After three hours of searching the forum I give up. Can anyone help please, is there a way of passwording a single field on a form. All I'm trying to achieve is have a user enter an authorisation code in a field. When he/she enters the field a password prompt pop up appears in which they must enter their password thus allowing them to enter data in the field. I have the first part working o.k. but whether the correct or incorrect password is entered I am still able to type in the field. I want it so data cannot be input into the field unless the correct password is entered. In otherwords they are blocked from that field unless they know the entry password. As always any help greatly appreciated.

Teresa
 
Last edited:
Select the field in question, and open the Properties box. On the Data tab, set the Locked property to "Yes".

When the user enters the password, use an If Then statment to evaluate the result.

If password = "CorrectPassword" Then
Me.TextBox.Locked = False
Else
Me.TextBox.Locked = True
MsgBox "Sorry, that's the wrong password."
End If
 
Thank you ever so much, it's working just great, exactly what I was after. I can now carry on. Thanks to this site little by little it's all coming together for me.
 

Users who are viewing this thread

Back
Top Bottom