suppressing dialog boxes

  • Thread starter Thread starter Thomas L
  • Start date Start date
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.
 
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
 
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
 
Back
Top