I have a form that is used for data entry and it does an add new record after and update. When the user clicks the X to close the form I want to prompt them to complete record yes or no. If they say yes how do I cancel the click of the X and put focus back in a text box. I have been trying several things. This is what it looks like right now.
myResponse = MsgBox("New Record Started...Do You Want To Complete Record? ", vbYesNo, "Complete New Record")
If myResponse = vbYes Then
Me.Undo
Cancel = False
Me.Qty.SetFocus
Exit Sub
Else
Cancel = True
Me.Undo
Docmd.Close
Exit Sub
End If
Thanks,
vmon
myResponse = MsgBox("New Record Started...Do You Want To Complete Record? ", vbYesNo, "Complete New Record")
If myResponse = vbYes Then
Me.Undo
Cancel = False
Me.Qty.SetFocus
Exit Sub
Else
Cancel = True
Me.Undo
Docmd.Close
Exit Sub
End If
Thanks,
vmon