B
Ben
Hi all,
Access 2003. I have a form, but I do not want the use to close, instead I
provided the button to go back to the previous form. If the user clicks on
the close button (x), I would like to add the logic to ask if the user really
wants to close, if not they clicked no, then do nothing.
In the form's Close event, in put in an IF statement:
Choice = MsgBox("Are you sure you want to quit the application?", vbYesNo +
vbCritical + vbDefaultButton2)
If Choice = vbYes Then
DoCmd.OpenForm "PreviousForm"
Else
' here is where I am not sure what to write
'I want to force the current form to stay opened if user choose no
End If
Thanks for your thoughts.
Ben
--
Access 2003. I have a form, but I do not want the use to close, instead I
provided the button to go back to the previous form. If the user clicks on
the close button (x), I would like to add the logic to ask if the user really
wants to close, if not they clicked no, then do nothing.
In the form's Close event, in put in an IF statement:
Choice = MsgBox("Are you sure you want to quit the application?", vbYesNo +
vbCritical + vbDefaultButton2)
If Choice = vbYes Then
DoCmd.OpenForm "PreviousForm"
Else
' here is where I am not sure what to write
'I want to force the current form to stay opened if user choose no
End If
Thanks for your thoughts.
Ben
--