If MsgBox("Do you want to Undo the unsaved changes you have made to the current record?", vbQuestion + vbYesNo, "Undo Changes") = vbYes Then
If Me.Dirty Then
DoCmd.RunCommand acCmdUndo
Else
MsgBox "There were no modifications made to the current record.", vbInformation, "Invalid Undo"
End If
Else
MsgBox "User aborted the Undo function.", vbCritical, "Aborted Undo"
End If