DoCmd.Save

  • Thread starter Rohan via AccessMonster.com
  • Start date
R

Rohan via AccessMonster.com

I recently found DoCmd.Save in a form that was linked to a 'close' button.
This was causing problems
so I removed it. Is there any way to replace it with a 'flush' like function,
that will save the details of the
form before closing it ?

Rohan.
 
R

Rick Brandt

Rohan said:
I recently found DoCmd.Save in a form that was linked to a 'close'
button. This was causing problems
so I removed it. Is there any way to replace it with a 'flush' like
function, that will save the details of the
form before closing it ?

Rohan.

Data changes in a form are automatically saved when you close. That command
would have only affected design changes to the form and has nothing to do with
saving data.
 
A

Allen Browne

Rohan, as Rick says, it would be a good idea to remove that line, as it is
doing nothing useful.

Whoever put it in there may have been trying to work around this bad bug in
Access:
Losing data when you close a form
at:
http://allenbrowne.com/bug-01.html

However, their code does not do that. The article shows 4 ways you can avoid
losing your entry when you close the form.
 
Top