Suppress Message pop-ups

G

Guest

Hi,
I have a few queries in a macro.
Each query has its own little message popping up, such as “You are about to
append, or delete, etc… number of recordsâ€, which requires the user to keep
clicking Yes Yes Yes.
How can I suppress these messages popping up?
Your help is much appreciated.
Regards,
Aniko
 
T

tina

before the first OpenQuery action, add a SetWarnings action.

note: in a macro, once you turn the warnings "off", you don't have to turn
them back on - Access does it automatically when the macro ends. but if you
use DoCmd.SetWarnings in VBA code to turn the warnings "off", you have to
explicitly turn them back on again because Access will not do it for you.

hth
 
G

Guest

Thanks Tina,
It's good to hear from you again:)

I used the SetWarning in the Macro not in VBA, and it works well.

Would you be able to tell me how to change the first MsgBox of to macro
which asks “Do yo want to proceed/†to Yes or No answers? If you click No,
close the macro and if you say Yes, continue with the macro?

Thanks millions,
Aniko
 
T

tina

hi Aniko - i didn't realize that was "you"! :)
i figured the VBA note wouldn't be of interest to you now, but i never know
when somebody will decide to "upgrade", so i just threw it in there - and
also for other folks who might read the post.
re the msgbox question: hmm, i've always done that in VBA rather than a
macro, but i think it can be done. i'll take a look and post back, if
somebody else doesn't answer you first.
 
T

tina

in the macro sheet, go to the first line of the macro that you want to
conditionally run - or not run. in the Condition column, enter a Msgbox()
function, as

MsgBox("Do you want to proceed?",4,"message box title")=6

the number 4 tells Access to put Yes/No buttons in the message box. the
number 6 is the value of the Yes button, which is returned by the Msgbox()
function when that button is clicked. so if the user clicks Yes then the
expression resolves to 6=6, so the condition is True, and the macro will
run. if the user clicks no then the expression resolves to 7=6, so the
condition is False, and the macro will not run.

if the macro has multiple actions that you want to run under the same
condition, don't forget to use the ellipsis (...) in the Condition column on
subsequent lines.

also, suggest you look at the MsgBox Function topic in Access Help. you'll
see more options for button combinations, setting a default button,
displaying icons, etc.

hth
 
G

Guest

G'day,
Thank you for the reply. This seam to be an easy solution, however, what do
you mean by "don't forget to use the ellipsis (...) in the Condition column on
subsequent lines"? What is ellipsis?
Do I need to have the same MsgBox(.....etc for each line of the macro?
Thanks for your time,
Aniko
 
T

tina

as always, i'm better at "show" than "tell". i wrote up a quick macro
example using the ellipsis, and tried sending it to the alphalink email
address i used for you previously. but i see that the email account is
expired. if you want to post another email address, i'll send the example
along to you. be sure you break up the address, to foil the spam miners!
(such as, myemailREMOVEaddressCAPITALatsomewhereLETTERSdottkomm)
 
G

Guest

G'day,
You are a champion!
I think I learned more form you than anybody.
Thanks heaps,
Aniko
 

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