Scheduled Tasks problems

BenH

Registered User.
Local time
Today, 10:00
Joined
Oct 31, 2008
Messages
25
I need to get my database to run as a scheduled task (using the /x option to run a macro). It uses linked tables. I wrote it on Access 2003 on my desktop machine, but the machine I need to run it off is a seperate machine that stays on all the time.

I got the scheduled task bit working on a Windows XP Machine's Scheduled Tasks, launching Access 2033. In the 'Path' section of the task, I put as below;

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe" full_path_to_my_database.mdb /x mcrAuto

E.g. the path to MSACCESS.exe in double quotes, and no other paths in double quotes. This worked.

However, when I then amended the DB to use Linked Tables, I kept getting runtime error 3151 when it ran any of the queries that used the linked tables. This was weird - it would not even let me view the linked table dialog box where you refresh them - came up with a weird box about missing modules. I assumed it was a broken installation of access 03.

So, I thought I'd try again on a different box, this time it's Windows 2000 and MS Access 2000. I have set up the scheduled task exactly as before, but it won't start, it just says "running" on the main screen, but nothing happens - MS Access does not even open!

Any advise?
 
Don't forget that "broken references" might be something so simple as being on a different machine that needs a one-time "References" adjustment. References reside in the registry because that is where Windows puts everything else. So EVERY MACHINE where you want to run your code will have a problem if you have done even ONE custom reference on the development system.

Also, if you aren't the system administrator for the non-development machines running the scheduled tasks, you need to look at system and group policies on those systems. Sometimes an overly zealous admin will restrict certain actions or tighten up permissions. Further, in my site (which is a U.S. Government site), Task Manager is a serious security risk if not properly constrained. We get all sorts of notices about it.
 
I've resolved this now, but the VBA referenced a Word Application, and so it had been set on Office 2003 to use the Office 10.00 word library.

I now get errors that the VBA can't find this, and so when I go into References to Add it on Access 2000, I get

name conflicts with existing module, project, or object library

It will not let me add it

:(

This is so problematic!
 
Possibly a reference to an earlier version of Word, OR it is already there? Another possibility is to use the up-arrow and down-arrow controls on the References dialog box to change the order of appearance of the Word library reference. This might be tedious, but if you move it up or down until the error goes away, the module you just moved forward or backwards and the one that didn't move are the two that have the conflict.
 

Users who are viewing this thread

Back
Top Bottom