suppressing dialog boxes

T

Thomas L

Hi,

on a form i have a button that starts an update query that sets a few fields
to a default value. When i click the button i have two dialog boxes that pop
up. A first one saying that i'm about to run an update query that will
modify data in my table and a second one that informs me that i'm about to
update n records. Is it possible to call that query in a way that those both
dialogs are not shown but that the query is run?

Thanks in advance for any help!

Kind regards,

Thomas L.
 
R

Rick Brandt

Thomas L said:
Hi,

on a form i have a button that starts an update query that sets a few fields
to a default value. When i click the button i have two dialog boxes that pop
up. A first one saying that i'm about to run an update query that will
modify data in my table and a second one that informs me that i'm about to
update n records. Is it possible to call that query in a way that those both
dialogs are not shown but that the query is run?

The preferred way to run action queries in code is with the execute method.
One of its advantages is that it doesn't display the confirmation messages
the way DoCmd...does.

CurrentDB.Execute "QueryName", dbFailOnError
 
T

Thomas L

thx, that was what i needed!

Thomas L.

Rick Brandt said:
The preferred way to run action queries in code is with the execute method.
One of its advantages is that it doesn't display the confirmation messages
the way DoCmd...does.

CurrentDB.Execute "QueryName", dbFailOnError
 

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