Run Update Query in silently in background

  • Thread starter Thread starter ghadley_00
  • Start date Start date
G

ghadley_00

I have a MS access 200 DB in which I have an update query which
repalces all the " " with ''" in a field. I would like the update query
to run in the background, and not ask the user for any perrmissions. I
was thinking to run the query as part of the autoexec macro.

can anyone recommend a way that I can have the update query run in the
background? I don't see an obvious way to set the SetWarnings command
for the query.

Any help would be greatly appreciated.

Best wishes,

George
(e-mail address removed)
 
"run in the background" ... once, once each day, every hour, every minute,
?how frequently?

You could use either a procedure or a macro to:

* turn the warnings off
* run the query
* turn the warnings back on
 
Thank you for the response. Was thinking of having the query run once
per user session (either when they started the database or closed it).
Any suggestions on how to do what you are suggesting would be greatly
appreciated.

Thanks.

George
 
George

If you create a macro named "Auto" (or something like that ... sorry, I've
not used macros in a while), it will run "automatically" when the
application opens.
 
Thank you for the response. Was thinking of having the query run once
per user session (either when they started the database or closed it).
Any suggestions on how to do what you are suggesting would be greatly
appreciated.

Thanks.

George

**The code provided is air code and to be used as and example or
starting point.

If you have a form that loads when the application opens you can try the
following.

in the on open function of the main form use this code.

on error goto err_trap

docmd.setwarnings false
docmd.runsql "Your Query Name Here"
docmd.setwarning true

err_trap_exit:
docmd.setwarning true 'Turn warnings back on in event of error.
Exit Sub

err_trap:
YOUR ERROR HANDLING HERE
resume err_trap_exit


--
Frederick Wilson

_____________________________________
for multimedia design services visit
http://www.legalanimatics.com
 

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

Back
Top