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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate Queries? 5

Status
Not open for further replies.

rpangel

Programmer
Jun 12, 2001
29
US
hello everyone,

i was wondering if anyone knew if it is possible to automate queries in MS Access to run daily and create a report?

thanks in advance,
angel
 
i keep getting invalid command, this is what i've typed to test and what i keep getting:
C:\> AT 09:49 /every MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" "MYDB.MDB"
Invalid command.

i also tried this just to test it to see if i can at least open access:
C:\>AT 09:49 /every MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE"
Invalid command.

have any suggestions????
 
rpangel,

You need a colon ":" after the "/every:"

:)

pjm
 
oops,i did have one, i must have let it out when i pasted it...
this is the most recent statement i've gotten so far. i'm not getting anymore "invalid command" statements and it's accepting it but it just isn't doing what i want it to do. maybe i'm just missing something. my task scheduler is on automatic and started... maybe you can take a look and let me know if u see anything else. i saved the path in a batch file and if i run the batch it works fine, but it's not working when i use it with AT. by the way, you've been a great help.

at 10:00 /every:Monday,Tuesday,Wednesday,Thursday,Friday "c:\access.bat"

this is in access.bat
"C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" "MYDB.MDB"
 
rpangel,

I'm at home right now & I don't run NT here, but my first things to check would be permissions on the job... To be honest I haven't had much luck with AT and have always used the task scheduler which comes with the IE desktop update. I'd really recommend that you get it as you can do multiple schedules v. easily, and you can explicitly set user/pwd for each job - saves probs later.

Have you checked the event log - anything in there about why the job didn't run?

Btw, you shouldn't need the batch file - just the path\filename.mdb of the database should be enough for NT to launch Access with your DB - works fine for me.

Try the task scheduler - and let me know if it still doesn't work - I'll mark this thread.

Good luck
pjm
 
it finally works!!!! thanks for all of your help. i went into WINNT and found the GUI task scheduler which is so much easier to use and it works perfectly. it just ran my report at 9:00 am just the way i wanted it. thank you all so much for all of your help. i appreciate it very much. thanks to you guys i've learned a lot about this process.
thanks again and have a nice day,
angel
 
A nicer way than using an autoexec macro is to get NT tasks to run a .bat file (Rename a .txt file) with code like:

"C:\Program Files\Microsoft Office\Office\msaccess.exe" "H:\project\CallCentreReports\Links\1300Exceptions.mdb" /x Load

where Load is the name of my macro.

This way you can schedule it to run whenever you like and dont have to worry about holding shift down every time you open the database.

Mike
 
rpangel,
Can you tell me where in WINNT you found the GUI task scheduler please

Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top