Eljefegeneo
Still trying to learn
- Local time
- Today, 10:49
- Joined
- Jan 10, 2011
- Messages
- 902
Using Microsoft Access 2010
I have a command button that runs a macro with the following:
If [MsgBox ("Do You Want to Close Form?", 4, "Form Closure") = 6
Run Code [MsgBox ("You Checked Yes")
Close Window
Form
FrmHistory
Save Prompt
Else
Run Code [MsgBox("You Checked No")
Stop Macro
End If
This works fine with only two options. But, If I use:
If [MsgBox ("Do You Want to Close Form?", 3, "Form Closure") = 6, giving me three variables, Yes, No and Cancel, I cannot figure out how to get the proper responses if No or Cancel are checked.
I have tried the attached, but it only brings up the message box "Cancel", never the "No"
What am I doing wrong?
It seems so easy in VBA, but I want to do it in a Macro. Thanks.
I have a command button that runs a macro with the following:
If [MsgBox ("Do You Want to Close Form?", 4, "Form Closure") = 6
Run Code [MsgBox ("You Checked Yes")
Close Window
Form
FrmHistory
Save Prompt
Else
Run Code [MsgBox("You Checked No")
Stop Macro
End If
This works fine with only two options. But, If I use:
If [MsgBox ("Do You Want to Close Form?", 3, "Form Closure") = 6, giving me three variables, Yes, No and Cancel, I cannot figure out how to get the proper responses if No or Cancel are checked.
I have tried the attached, but it only brings up the message box "Cancel", never the "No"
What am I doing wrong?
It seems so easy in VBA, but I want to do it in a Macro. Thanks.