Message Box

I have a Microsoft Access dataabse. In this database I have a form with a button on it. After the botton is clicked I would like a message box displayed asking "would you like to run this command: yes,no, or cancle"... Any suggestions
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

omgangConnect With a Mentor Commented:
Dim intResponse As Integer
Dim strMsg As String

strMsg = "Would you like to run this command?"

intResponse = MsgBox(strMsg, vbYesNoCancel, "Make A Choice")
If intResponse = vbYes Then
    'Do Something
ElseIf intResponse = vbNo Then
    'Do  Something else
End If

OM Gang
Access uses VB script so you can use following syntax.

MsgBox(prompt [, buttons ] [, title ] [, helpfile ] [, context ] )

more info then follow this link
Rey Obrero (Capricorn1)Commented:
private sub button_click()

msgbox "Would you like to run this command?",vbyesnocancel

end sub

explain what needs to be done for each option selected
Will_PAuthor Commented:
The solution was perfect! All I had to do was enter my command inside of the if then statement
All Courses

From novice to tech pro — start learning today.