C
CCripe
Users are going into to update a number, and they want to close the form
before the record gets saved, thus losing their changes.
I created an Exit button, which should save the record change and close the
form. Here's the code:
If Me.Dirty Then
RunCommand acCmdSaveRecord
End If
Forms![frmRMSHours]![Act Hours] = Me![Text9]
DoCmd.Close
If the record is dirty, they press Exit and the record saves. They have to
press Exit again and the form closes. If the record is not dirty, the form
will close when pressing Exit. What am I doing wrong?
before the record gets saved, thus losing their changes.
I created an Exit button, which should save the record change and close the
form. Here's the code:
If Me.Dirty Then
RunCommand acCmdSaveRecord
End If
Forms![frmRMSHours]![Act Hours] = Me![Text9]
DoCmd.Close
If the record is dirty, they press Exit and the record saves. They have to
press Exit again and the form closes. If the record is not dirty, the form
will close when pressing Exit. What am I doing wrong?