Run a query using code.

T

Terry Thomas

Hi I have two queries, one is an append query and the
other is a delete query.

I would like to run them at certain times in the db. How
can I add code to a click of a button event but not come
up with any message boxes or errors even if there is no
matching criteria.

Thanks

Terry
 
A

Andreas

The easiest way way to be use a macro.
Set the first instruction to turn off warnings (SetWarnings I think).
The next 2 will run your 2 queries (OpenQuery I think).
Then turn your warnings back on.

Regards,
Andreas
 
Top