Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password protect one field 1

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
Is it possible to password protect one field on a form?

I have a form that has a field with either a yes or a no.

If it returns a yes they are allowed to print a label. If it returns a No they cannot.

But there may be certain cases were a supervisor would need to overwrite the return of NO..

Thanks in Advance DVannoy
A+,Network+,CNA
dvannoy@onyxes.com
 
Not sure about passwording a single control on a form, but how about using the "Username" network environment variable to enable/dis-enable the control. For example, in the form load event:

Select case Environ$("Username") 'or whatever VAR is used
Case "Doe": MyForm.[control].enabled = True
Case "Smith":MyForm.[control].enabled = True
Case Else:MyForm.[control].enabled = False
End select

 
I have had to implement this for several controls on a form under just the circumstances you describe - ie: someone in authority should be able to change values.

I put my code behind the 'On Enter event' which triggered a MsgBox asking if the user was sure they wanted to change the field. If the answer was yes, I unlocked the field. If No, I left it.

It would be simple to display an InputBox instead asking for a password, checking the result and acting on the result.

I'm not sure if you can make the word typed in an InputBox come up in asterisks like a proper password, though, but I guess this might not matter too much.

HTH.

Regards

Paul
 
See in the property of texbox what you want to "password protect". Choose the tab "Data" and in "Input Mask" type password. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top