Solved

Message Box

Posted on 2011-03-24
4
297 Views
Last Modified: 2012-06-27
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
Comment
Question by:Will_P
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:satshah
ID: 35206852
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
 
LVL 28

Accepted Solution

by:
omgang earned 500 total points
ID: 35206870
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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35206879
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
 

Author Closing Comment

by:Will_P
ID: 35207450
The solution was perfect! All I had to do was enter my command inside of the if then statement
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question