Code pop-up to "yes"

jeo

Registered User.
Local time
Today, 23:43
Joined
Dec 26, 2002
Messages
299
Is there a way to code an answer “yes” on a delete/append query?
I want to avoid a user having to push yes, yes, yes when I run one of my reports.
There has to be a way to code around that, so all a user sees is a report once everything is done running.
Thanks.
 
Why does the report prompt the user for 'yes'?

kh
 
Use VBA to turn the warnings off like this:

Code:
With DoCmd
    .SetWarnings False
    .OpenQuery "YourQueryHere"
    .SetWarnings True
End With
 
Hum...

I thought it prompted once for the entire query...

kh
 
KenHigg said:
I thought it prompted once for the entire query...

Na:

You are about to run an append query. Continue?

You are about to append 2324 record(s). Continue?
 
Here is what I'm trying to turn off/code to yes - see attachment
 

Attachments

So do I use this code for the On_Click event?
With DoCmd
.SetWarnings False
.OpenQuery "YourQueryHere"
.SetWarnings True
End With
And one more thing...is this doable when you run a Macro as well?
 
Last edited:
Yes. Just remember to change YourQueryHere to the name of the action query. ;)
 
I got it...
And I figured out for the Macro, you do a .RunMacro("MacroName")
Thank you very, very much for all your help and your quick response!
:)
 

Users who are viewing this thread

Back
Top Bottom