mmm, its not really working how i expected. On my form unload i want to check if there have been any edits, if there has i want to display a custom save msgbox.if they choose no here then the edits will be discarded.
If Me.Dirty then
If MsgBox(strmsg, vbQuestion + vbYesNo, "Save Record?") = vbYes Then
...code here...
Else
DoCmd.RunCommand acCmdUndo
End if
yet me.dirty is returning false even when I have edited data?
Put your code in the 'before update' event of the form. By the time the form unload event runs, the edits have already been saved (which is why the Me.dirty is returning false).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.