Force to save record

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I have a form to display a record so that user can edit
the record. How do I force the form to save or cancel the
changes of the record? I want to warn the user if he has
not save the changes before closing the form.

Many thanks

Kevin
 
Kevin said:
I have a form to display a record so that user can edit
the record. How do I force the form to save or cancel the
changes of the record? I want to warn the user if he has
not save the changes before closing the form.

Since Access automatically saves changes when you leave the record, such a warning is
unnecessary. Some developer's go the other way and warn the user that he has made
changes and prompts them to ask if they should be saved. I think this is a grand
waste of time for both the developer and the user.
 
Hi Rick

But in some cases that users might have accidentally
changed a record and did not want to save the changes. The
confirmation could allow user to avoid the saving
unintended changes. But I don't know how to force the form
to cancel the changes.

Keivn
 
Kevin said:
Hi Rick

But in some cases that users might have accidentally
changed a record and did not want to save the changes. The
confirmation could allow user to avoid the saving
unintended changes. But I don't know how to force the form
to cancel the changes.

If you think that is a big enough problem then I would recommend locking the
form until an Edit button is pressed. That way you don't need to prompt as the
user is effectively answering the question before you asked. It's only my
opinion of course, but apps that constantly ask "are you sure you want to do
that?" are a real PITA.
 
"but apps that constantly ask "are you sure you want to do
that?" are a real PITA."

That's the way I feel
too, until of course I do something
I really didn't mean to do :-)


Dan Artuso, Access MVP
 
Back
Top