Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

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
0
Will_P
Asked:
Will_P
1 Solution
 
satshahCommented:
Access uses VB script so you can use following syntax.

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

more info then follow this link

http://office.microsoft.com/en-us/access-help/msgbox-function-HA001228886.aspx
0
 
omgangCommented:
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
0
 
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
0
 
Will_PAuthor Commented:
The solution was perfect! All I had to do was enter my command inside of the if then statement
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now