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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protection for Certain Fields Only

Status
Not open for further replies.

mistereli

Technical User
Jan 13, 2003
73
US
I'd like to put a password protection on 2 certain fields in order for those fields to be modified. Nothing more than that. Is it possible? Thank You in Advance!
 
Yes it is possible, and there are a zillion ways to do it. But which ever way you choose will involve coding.

If you implement Access security, you can...
- Control access to tables
- Control access to forms and reporrts

You can not control access to specific fields. But a good work around is to have two nearly identical forms. Open one form if the user belongs to one security group which allows the user to edit the fields. Open the second form if the user does not belong to the security group - this form does not allow the fields to be edited.

A variation on this is to use the field property.

For example...
boAccess = CheckSecurity()

Me.AssetID.Locked = boAccess

Where you create a program module, I have called it CheckSecurity, to check the access rights. If the user has rights, it returns True, if not module returns False. The boAccess variable then locks or unlocks the field.


But you may not want to invoke security for controlling access to only two fields.

You can use the same logic as indicated above, but this time you ask the user to enter a password, either when they open the form, or tyr to access the field. If the password matches, then the field is unlocked and they can edit the field. The issue here is that you will have to eitehr hard code the password, or store it on a table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top