Could you please let us know which version of Access you are using? That will definitely help people replying to your question.
To answer your original question, yes you can certainly display a Yes/No message box from a macro and then take different action on what button is clicked.
In Access 2010, conditional logic in macros is way easier than previous versions, but it is still possible in previous versions; it's just a little more tricky.
Here's a quick example using Access 2007 in case you are using that version.
For the first line of this sample macro, enter this in the Condition column:
6<>MsgBox("Please click one of the buttons.",52)
In the Action column on the first time, use the MsgBox macro action and display a message that says "You clicked No."
On the second line of this macro, enter three dots ... in the Condition column to apply the condition from the previous line. In the Action column for the second line, use the StopMacro action.
On the third line of this sample macro, don't put anything in the Condition column. In the Action column of this third line, use the MsgBox macro action and display a message that says "You clicked Yes."
Save the macro and then run it to try it out.
You'll get a Yes/No message prompt that asks you to click a button. If you click the No button, you'll see a message box saying you clicked No and then the macro stops. If you click Yes, you'll see a message box saying you clicked Yes and then the macro stops.
In the sample example I provided, I used Yes/No buttons, a warning message box (the one with the exclamation point icon), and I was testing to see if they clicked the Yes button. You can modify this to present different options using the MsgBox function.
Hope that helps,
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: http://www.AccessJunkie.com
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