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

Prevent Form Edit Mode

Status
Not open for further replies.

Earthworks

IS-IT--Management
Sep 30, 2003
16
GB
I want to prevent the user from gaining edit mode to a form based on the value of a field on the form.

i.e. the form should not be editable after a review date has been entered. If it is blank the form can be edited.
 
You need to use the QueryOpen and QueryModeChange events of the form, but you will have to do it in LScript.

In the QueryOpen event, you check if the user is opening the document in edit mode or in read mode. If in edit mode, then you check the field value. If the field is set to prevent editing, set the Continue variable to false. You may wish to pop up a little message stating the the user cannot edit the document at this time (to prevent calls to the helpdesk). Or you can simply revert to read mode, again with a little popup.

In the QueryModeChange event, just check if the field is set to prevent editing. If so, set Continue to false again, and a little popup.

If you have any trouble with coding this, just reply to this thread and we'll work together.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top