Force to save record

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
 
R

Rick Brandt

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.
 
K

Kevin

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
 
R

Rick Brandt

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.
 
K

Kevin

Hi Rick

Thanks for your suggestion but do you know how to
save/undo the changes?

Kevin
 
D

Dan Artuso

"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top