How do I turn off a couple of messages when r

K

keith

Hello,

I am using VBA to run a query that is connected to a command button in a form.
The query over writes an existing table with new data.

Each time the query runs, Access shows two dialogue boxes.
The first message is …

“Existing table [query name] will be deleted before you run the queryâ€

And

“You are about to past [number] rows into a new tableâ€

The users of this command button don’t need to be reminded of these two
steps. How do I turn them off, temporarily, using VBA?

Thank you.

Keith
 
M

Morris

Hello,

I am using VBA to run a query that is connected to a command button in a form.
The query over writes an existing table with new data.

Each time the query runs, Access shows two dialogue boxes.
The first message is ...

"Existing table [query name] will be deleted before you run the query"

And

"You are about to past [number] rows into a new table"

The users of this command button don't need to be reminded of these two
steps. How do I turn them off, temporarily, using VBA?

Thank you.

Keith

try

DoCmd.SetWarnings False

....Queries that you need to run...

DoCmd.SetWarnings True
 
K

Keith

HI Allen,
Thanks very much.
Keith

Allen Browne said:
See:
Action queries: suppressing dialogs, while knowing results
at:
http://allenbrowne.com/ser-60.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

keith said:
I am using VBA to run a query that is connected to a command button in a
form.
The query over writes an existing table with new data.

Each time the query runs, Access shows two dialogue boxes.
The first message is …

“Existing table [query name] will be deleted before you run the queryâ€

And

“You are about to past [number] rows into a new tableâ€

The users of this command button don’t need to be reminded of these two
steps. How do I turn them off, temporarily, using VBA?
 

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