Saving Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I noticed that access does not seem to commit records to the database until
the form is closed. I need to force a form to save it within the VBA code.
Is there a way to accomplish this?
 
You could add a command button to the form. Using the wizard, you can have
that command button save your record.

Regards

Jeff Boyce
<Office/Access MVP>
 
That is not correct provided you are using bound forms. If you use bound
forms, records will be updated whenever you move to another record or close
the form. It sounds like you may be using unbound forms. In that case, you
would have to populate the controls on your form and update your date
programmatically.
 
I noticed that access does not seem to commit records to the database until
the form is closed. I need to force a form to save it within the VBA
code.
Is there a way to accomplish this?

Actually, any record navigation will save the record also.

However, you often need to save the record before launching other forms, or
even running some processing code.

The prefer way to fore a save is

if me.dirty = true then
me.Dirty = false
end if
 
Back
Top