Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

Run Update Query in silently in background

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ghadley_00@yahoo.com - 30 Dec 2005 13:17 GMT
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
ghadley_00@yahoo.com
Jeff Boyce - 30 Dec 2005 13:39 GMT
"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

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> 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
[quoted text clipped - 11 lines]
> George
> ghadley_00@yahoo.com
ghadley_00@yahoo.com - 30 Dec 2005 15:52 GMT
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
Jeff Boyce - 30 Dec 2005 19:14 GMT
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.

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> 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).
[quoted text clipped - 4 lines]
>
> George
John Spencer - 31 Dec 2005 14:10 GMT
Jeff,

The name of the macro should be  "AutoExec"

> George
>
[quoted text clipped - 16 lines]
> >
> > George
Jeff Boyce - 31 Dec 2005 17:28 GMT
Thanks, John.  I told you I hadn't been there in quite a while... <g>!

Jeff

> Jeff,
>
[quoted text clipped - 20 lines]
> > >
> > > George
Frederick Wilson - 31 Dec 2005 14:14 GMT
> 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).
[quoted text clipped - 4 lines]
>
> 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

Signature

Frederick Wilson

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.