Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to close Form??

Status
Not open for further replies.

ii128

Programmer
May 18, 2001
129
US
On the form, I want to pop up a message, if the user doesn't click on the OK button on the message the form Automatically close.

Anyone can help me? how can I do that???
 
Try this...

Dim strMsg As String

strMsg = MsgBox("Prompt", vbOKCancel, "Title")

If strMsg <> vbOK Then
DoCmd.Close acForm, Me.Name
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top