Solved

Msgbox Yes No

Posted on 2006-07-06
4
573 Views
Last Modified: 2012-06-27
I have a yes/no msgbox - I want different actions to happen dependant on the click of yes or no - how do I go about this ?
0
Comment
Question by:Carl2002
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Natchiket earned 250 total points
ID: 17049171
Assuming you are using VBA

If Msgbox("Message",vbQuestion+vbYesNo,"Title bar") = vbYes Then
  'Yes click actions
Else
  'No click actions
End IF
0
 
LVL 14

Assisted Solution

by:bluelizard
bluelizard earned 250 total points
ID: 17049173
when you call msgbox, the returned value is the button that was clicked:

if msgbox("do you want such and such?", vbyesno) = vbyes then
  ' user clicked yes: do yes stuff
else
  ' user clicked no: do no stuff
end if


--bluelizard
0
 
LVL 14

Expert Comment

by:bluelizard
ID: 17049187
tie! ... well, anyway, we seem to agree...! ;-)
0
 
LVL 17

Expert Comment

by:Natchiket
ID: 17049342
vbYes
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

860 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