How to schedule an access application by code in Access 2000/2002

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi every body,

How can I schedule an application by using Access code?
an exemple would be perfect.
thanks.

Best reguards
 
hi,
to start Access with your application - you can use windows task scheduler
to schedule some task in access - you can opne a hidden form win your
application, enable timer on it (set it to say 1 min=60000 milisec) and use
Timer event to check for a current time, and if if match so predefined
time - run your code
 
If you want to run an application in a certain day and time, use the windows
schedular, you can't run code in application that is not loaded yet.
I hope I understood your question
 
What I mean is to schedule the application without using the windows schedular.
an access application do what the windows schedular is doing.

reguards

"Ofer" skrev:
 
What I mean is to schedule the application without using the windows schedular.
an access application do what the windows schedular is doing.

reguards


"Alex Dybenko" skrev:
 
There are ways, but you'll find that they are much more complicated than
using the windows schedular.
 
Well, for this Access application to open another Application, the first
application need to be open, and then you can use the form timer to do that
for you, but this form need to the active form, which mean, if another form
is open then the Timer wont work.

So, I would use the windows schedular, much safer that it will actually happen
 
Hi again,

I think I did not discribe my problem well the problem is as follows:
I need the code in access to schedule any application or file.

explanation:
I need application A to intall application B.
Application A will copy files and schedule application B.
I will not need application A, application B will start because it is
scheduled.

thanks lot

"Ofer" skrev:
 
If application A is open, use the OnTimer event of a form, that you know its
open

Set the TimerInterval of the form, to how often you want the application to
check if its time to run application B
In the OnTimer property insert the code to check for a certain time

If format(Time(),"hh") = "13" Then ' To run at 1 PM
Run the code to copy file
Run the code to run application B
Docmd.Quit ' to exit Application A
End If

With all of that I still don't undestand why you object in using the windows
schedular
 
After reading all of the responses to your post I am getting the impression
that nobody actually had the answer or maybe did not understand the question.
If I am understanding you correctly then you were, or maybe still are,
searching for the same thing I am. I need to have access or a bat file go and
create a scheduled task for me in the windows task scheduler. That will
schedule the task for me actually for field techs that would be a nightmare
trying to talk them through this process. So I need to have something I can
have them click on from out in the field that will schedule the task for them
/ me. If this is the same thing you were after and you got an answer please
let me know. I will be creating a post of my own requesting some direction on
how to do this in Access. thanks - Sparker
 
Windows (NT onwards) has a command-line interface for creating scheduled
tasks, so you can either distribute a .cmd file or have your VBA code
construct the command and use Shell() to execute it. The Windows command
is AT: just type
AT /?
at a Windows command prompt to get the details, or see
http://support.microsoft.com/?id=313565
 
Back
Top