Confirm changes on form

Romper

Registered User.
Local time
Tomorrow, 03:07
Joined
Oct 28, 2012
Messages
83
Hi all,
I was wondering if it is possible to create a "Confirm changes" dialog for a form. If I open a form at the moment and edit a field, that change is automatically saved to the table. The problem with this is if a change was made accidentally, it would be saved when you moved to the next record and you'd never know. I've looked at the Event tab for the property sheet for the form and noticed that you could possibly add an Event Procedure for "On Close" but would this work for just moving to the next record?

What would be the appropriate Event to select and what would the code be for that Event?
:confused:
 
The BEFORE UPDATE event of the form. And you would do your validation checks there and then if it failed you issue a

Cancel = True

and it won't save. You don't have to do anything if it passes validation.
 
Thanks Bob,

Validation checks? Is that more code that needs to be written?
I'm in unknown waters with this. Should this be a Macro, Expression or Code?
Is there a site that I could download or copy it from, surely it's a pretty common thing that people would use? I've referenced my Access Dummies book but failed to find help in that, and I don't really want to spend hours reading up on code just for this one occasion.
 
I've found my answers and solved my issue. Thanks.
:D
 

Users who are viewing this thread

Back
Top Bottom