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

Executing a query automatically once a day 2

Status
Not open for further replies.

ScubaStevo

Programmer
May 4, 2002
132
0
0
AU
I need to run a particular query to update a table once a day from a linked table to a mainframe and would prefer it if I didnt have to run it manually myself, but it would run at 3:00am because it can take a while to run. Any help on this task would be greatly appreciated.

Cheers, Stevo
 
You could insert a hidden form into your application that would have the timer activated and set to check the system time every 10 minutes or whatever period you choose.
The timer would activate a code item which would activate the query.

Timer event:
If Me.Timer > "the set time" then
CurrentDb.Execute("qryUpload")
End if
Me.Timer could be a textbox with the time displayed

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Can the query be run automatically at the same time just once a day? I know I will need to leave the database open but thats a small price to pay.
 
Thats works a treat, can I put something in the command line that will automatically sign me because this database has several user accounts and passwords.

Thanks heaps

Stevo
 
Yes, I would need to search Help or Google to find the answer.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
I found how to automatically sign in with my username and password, run a specific macro and she works sweet, but can that scheduling program run a shortcut to the database or execute command line parameters so i can sign in and run the macro? Its doesnt seem to like the /user and /wrkgrp commands
 
I believe it should all work with the proper command line. You could create a batch file with the command line set up the way that you know it works and then have the scheduler call the batch file.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Sorry you are absolutely correct it works perfectly now thank you so much. It now runs at 3:00am every weekday, signs me in with my password and runs a macro that imports a table of about 500mb from a mainframe while I'm asleep.
Very helpful indeed, thanks once again.

Stevo
 
ScubaStevo can you tell mw how you can automatically sign in ?

Regards

Duff
 
Yeah with /user "username" and /pwd "password" in the command line just like th /wrkgrp one. Does that make sense?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top