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
 

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

Back
Top