Customize Message Boxes

J

jenni

Good morning from Detroit,
I have a macro set up to run an append query which is
making a duplicate of the selected record on a form. It
runs using the "OpenQuery" action in a macro. This is
working great.

But now I want to customize the 2 message boxes that pop
up for an apppend query,
1) Are you sure you want to run this action query...
2) You are about to append 2 rows....

I would like to change the messages so that they don't
confuse the user.

I would prefer them to say...
1) Are you sure you want to copy this order?
2) Your order has been successfully copied, your new
order # is 123.

Can someone please give me a tip on how to do this?

Thank you!
 
S

Steve Schapel

Jenni,

As far as I know, you can't change the wording of the action query
confirmation messages as such. You will have to disable them by putting
a SetWarnings,No action in your macro before the OpenQuery action.

Then, you can get the functionality you want by:
- put a Condition in the macro for the OpenQuery event (if you can't see
a Conditions column in the macro design window, you can enable it by
selecting Condition from the View menu). The condition will be the
equivalent of...
MsgBox("Are you sure etc...",36,"Confirmation")=6
- add another MsgBox action to your macro to show the other message...
but note that this message will show, whether or not the append was
successful, i.e. if you want to actually be rigorous and actually check
that the new record was actually added, this would be a bit more
complicated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top