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

Onclick event fires on a field that has enabled and locked set to NO

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have a aplit form. The first column in the form is a field named "Reference Number". There is code in the onclick event that opens a form. The form is grayed out to certain users. However, if they click on the reference number field, the form opens. Since it is grayed out, why would that be happening and how can I make it where the form won't open to users without proper rights?
 
It happens because you can still click it...

If you made it not visible (hid it) conditionally they can't click it.

You could make two copies of the text box.... the restricted permissions slightly smaller.... On that one don't have an on click event.... Hide the other one as appropriate.

Or use Access security and remove permission to the form and trap the error on click.

Or Use some sort of function to determine the user and test for 'permission' in your click event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top