Hi I have a form in which there is a close button (cmdClose). I want the prompt to request for Discard. If yes discard and close form. If No to Set focus to previous control. And if no change close the form. I am having trouble getting this to work. Would appreciate your advice.
If Me.Dirty = True Then
If MsgBox("Discard the changes?", vbYesNo, "Discard") = vbNo Then
DoCmd.Close , "frmRequest", acSaveNo
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.