View Single Post
Old 11-03-2010, 01:53 PM   #5
Senior Managing Editor
AccessJunkie's Avatar
Join Date: May 2006
Location: Rogue Squadron
Posts: 277
Thanks: 0
Thanked 69 Times in 45 Posts
AccessJunkie will become famous soon enough
Re: Run Yes/No MessageBox from MACRO


Thanks for the version number, that's very helpful.

If you're using Access 2010, designing macros in the new Logic Designer is way easier than previous versions. As you've already commented, you can use the new If/Else/Else If constructs right inside the macro logic. This is very helpful when doing conditional logic within macros.

On to your next question:
May I ask you: It's interesting to me, in CheckBoxes I know that "Yes"/"No" stand for "0"/"1" or "-1"/"0",
From your example I learnt that in the MessageBox "Yes" stands for "6", not "0" or "1" or "-1" as assummed.

Excellent question. I had a feeling you were going to ask that.

When you're using the MsgBox function, you can customize what buttons show, what icons show, which button is the default, and get a return value for the button that was clicked by the user.

Here is a table of the return values right out of my 2007 and 2010 books for you:
Return Values for the MsgBox Function
1 OK button clicked
2 Cancel button clicked
3 Abort button clicked
4 Retry button clicked
5 Ignore button clicked
6 Yes button clicked
7 No button clicked

Does that help?

Jeff Conrad - Access Junkie - MVP Alumnus
SDET II - Access Test Team - Microsoft Corporation

Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010 Info:

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
AccessJunkie is offline   Reply With Quote
The Following User Says Thank You to AccessJunkie For This Useful Post:
bcmarshall (01-19-2017)