Save Record

R

Rob

I need to have the form save the current record after one
of the controls looses focus. I'm new to coding and have
come up with the below code. When the control looses
focus no error messages appear but the record isn't
saved.
Thanks,
Rob


Private Sub DDPosition_LostFocus()
On Error GoTo Err_DDPosition_LostFocus

DoCmd.RunCommand acCmdSaveRecord

Exit_DDPosition_LostFocus:
Exit Sub

Err_DDPosition_LostFocus:
MsgBox Err.Description
Resume Exit_DDPosition_LostFocus
End Sub
 
G

Graeme Richardson

Hi Rob, I can't see a problem with the syntax you've used. I have no
problems with

Me.Dirty = False

Cheers, Graeme.
 

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