X button

P

PAOLO

When designing a form Access gives you the option to make the X (close form)
button disappear off the form border...

Is there a a way to make that button disabled until the user clicks for
example a "Save" button?

Thanks for your help
 
A

Allen Browne

Paolo, there are too many ways that a record can be saved, so disabling the
close button won't achieve that. For example, it will be saved if the user
merely cycles through the records to the next (new) record), presses
Shift+Enter, closes the form through the menu (File | Close), closes Access,
right-clicks a field to change the sort order, applies a filter, and so on.

If you want to check the values are okay before closing, use the
BeforeUpdate event procedure of the form to run that validation, and cancel
the event if the values are not acceptable.
 
Top