Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start MS access from scheduler

Status
Not open for further replies.

JaneInMA

Programmer
Nov 3, 2000
104
US
I have started to do a lot of tasks in the autoexec file and my users are starting to complain about the opening time. I would like to use a database shell purely to do these tasks and running it at some point in the early am.
I do not have a lot of experience with task scheduler so I am uncertain if I need to write a batch file and run that or if I just run Access directly.
I need to pass in my username and password to log in as myself to allow Access to use my email account to send email notifications.
I already know how to get Access to send email and to close but help with starting Access and Outlook would be appreciated. Specific syntax help or sample scripts would be greatly appreciated.
 

I don't see a single question mark in this post. Is there a question?
 
Eric, I wanted general help in how to get the scheduler to perform this.
ie
Can anyone provide a sample script that would do the above task?
 
Unless you want to do things that only Access can do, you should be able to write a script that does everything you need.

Also, please mention what version of Windows you are running. I found a page that gives instruction on how to use the windows 2000 task scheduler, but I'm sure that it's different for 98/95. I'm not sure if it's on NT at all!
 
The script will run on windows 2000.
I want to start Outlook(97) then
I want to start Access97 put in my name and password.
The autoexec will then run queries that then trigger table changes and emails to be sent with the data.
If I could get Access to start remotely then I would be all set.
So for Task Scheduler in Windows 2000 do I try to do it directly or write a script? and either way how do I give it the information it needs?
 
You can do this within Access.

You can run Access and log in as part of a command line. Check out "Command line" help in access. So this would get you logged in.

One of the things you can do with that command line is run a macro. :)

It should be easy after that, create a macro that runs a form, code, modules, queries, whatever. You can have Access run Outlook (I thought you could mail directly out of access though)

Did I cover everything?
 
I am trying to do this when all my users have gone ie either before 7:30 in the morning or after 8:30 at night. I was trying to do it say 1 AM in the morning. I do not wish to come in to run the program at this time and do not want to leave my program running hence I really want to learn how to use scheduler to open Access at a predetermined hour.
Does anyone know how to do this?
 
This gives a basic tutorial to run the task scheduler


When you said "If I could get Access to start remotely", that means logging in and starting the process. So that shaped my answer.

Using the web page and the instructions I gave above, you should be able to get this working.

By the way, why don't you want to leave Access running?
 
I think I have solved this. Using the scheduler and even just practising using the run function I could not get it to take the password. but using the fact I really just need it to link to network files not be on the network I copied the mdb to my desktop.
then I used the following instruction in the scheduler.
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Documents and Settings\mccja01\My Documents\Scheduling10-02-01.mdb" /user mccja01 /pwd *********

Using a similar instruction with a path to the network did not allow access to accept the password. Our network is extremely unreliable and a pain in the neck. This is why I do not want to keep my dbs up and attached to the network all night long.
Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top