save current record in VBA code

E

emmy

Hi there, I'd like to have a SAVE button on a bound form.
When the user clicks on the button, the current record
will be saved (if it's dirty), instead of having the user
move to another record using the record navigator.

Thanks a bunch!

Emmy
 
D

Dirk Goldgar

emmy said:
Hi there, I'd like to have a SAVE button on a bound form.
When the user clicks on the button, the current record
will be saved (if it's dirty), instead of having the user
move to another record using the record navigator.

If you really need to do this, you can write

RunCommand acCmdSaveRecord

or

If Me.Dirty Then Me.Dirty = False
 

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