A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

schedule job



 
 
Thread Tools Display Modes
  #1  
Old August 18th, 2005, 05:45 AM
00Eric Clapton
external usenet poster
 
Posts: n/a
Default schedule job

Is there a scheduler in access 97 which I can use to schedule query, macro
or code? If not, other solution? Thanks.


  #2  
Old August 18th, 2005, 07:37 AM
Albert D.Kallal
external usenet poster
 
Posts: n/a
Default

The prefer solution is to use the windows scheduler. That way, you don't
have to leave a large application like ms-access running all the time.


Your batch file that the scheduler runs can simply start a application up.

start "path name to your mdb file"

If you use the above, you must use a autoexec macro in ms-access, or a
startup form that runs code. AND YOU CODE MUST then shut down ms-access.

If you need to run *different* routines all the time, then I would suggest
you use windows scripting .

If you are familiar with windows scripting, then you use what is called
automation.

Here is a example:

dim accessApp

WSCRIPT.ECHO "Click ok to run batch job",64

set accessApp = createObject("Access.Application")

accessApp.OpenCurrentDataBase("C:\Documents and Settings\Albert\My
Documents\Access\ScriptExample\MultiSelect.mdb")

accessApp.Run "TimeUpDate"

accessApp.Quit

set accessApp = nothing

WSCRIPT.ECHO "Job complete", 64


The above windows script would launch ms-access, run a subroutine called
TimeUpdate in a public code module, and then quit ms-access. You can type in
the above text into a standard notepad document. You then re-name the
extension from .txt to .vbs. You can now click on this icon to run the code,
or have the windows scheduler run it once a day, week, hour or whatever.
Note in the above, if you use the windows scheduler, either remove the echo
commands, and use the name of the vbs script directly in the scheduler. Or,
use the command script (cscript).

cscript nameofyourscript

(cscript will ignore the prompts via the echo command).

And, last but not least, you can leave ms-access running, and simply use a
timer event on a form, but I don't think that is great solution here...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.members.shaw.ca/AlbertKallal


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a file of a schedule -- like a local sports schedule Bob Calendar 2 January 16th, 2005 04:42 AM
Table Design - Incorporating Schedule Changes Rebecca Riordan New Users 0 July 9th, 2004 05:16 PM
My Schedule: Am I dreaming? JEM Links and Linking 2 May 22nd, 2004 02:53 AM
My Schedule: Am I dreaming? JEM Charts and Charting 0 April 19th, 2004 05:44 AM
Sports Schedule Sportsnut Worksheet Functions 2 March 19th, 2004 08:51 PM


All times are GMT +1. The time now is 06:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.