Real Wally
Registered User.
- Local time
- Today, 02:57
- Joined
- Jan 28, 2003
- Messages
- 107
Hi,
I'd like to get a msgbox when closing a form that gives me the option to either save or not save the record, but only if changes have been made to the record.
I've got this so far but that doesn't work:
If Me.Dirty Then
MsgBox(StrMsg, vbQuestion + vbYesNo, "Save this Record") = vbYes
DoCmd.RunCommand acCmdSaveRecord
End If
It wants another 'Then' or so after the vbYes but that is incompatible with the 'Then' after If Me.dirty.
What's the trick?
Thanks,
Wally
I'd like to get a msgbox when closing a form that gives me the option to either save or not save the record, but only if changes have been made to the record.
I've got this so far but that doesn't work:
If Me.Dirty Then
MsgBox(StrMsg, vbQuestion + vbYesNo, "Save this Record") = vbYes
DoCmd.RunCommand acCmdSaveRecord
End If
It wants another 'Then' or so after the vbYes but that is incompatible with the 'Then' after If Me.dirty.
What's the trick?
Thanks,
Wally