If the form is meant to only look at existing you can turn off the AllowAdditions property in the main form. Then the user can't enter in data in a new record to get saved.
Then you need to put code in the before update event to check if the record should or shouldn't be saved and code appropriately. You can cancel the update event and inform the user that they can't exit because of the current state of the record. Joe Miller
joe.miller@flotech.net
You should use a variable inside the form that decides whether or not the form may be closed.
Then you check the value of the var in the OnClose event. If it is FALSE, then cancel=true.
You just need to set the var to TRUE in the appropriate close command button.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.