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!

run automatically a macro with the access compiler 1

Status
Not open for further replies.

Cabrita

Technical User
Apr 3, 2002
140
PT
Hello,

I created a database with a macro that I want to run automatically everyday at 2 a.m., so to run that macro I use the scheduled tasks program. But the problem is that the computer where I what the macro to run only have the access compiler and I cannot make the macro to run in that computer.

The line that I put in the scheduled tasks is:

"C:\(....)\msaccess.exe" "C:\(...)\hghdsg.mdb" /x macro1

This line works in a computer with the complete version of the access. If anyone have an idea I would appreciate very much your help.

Thanks

Andre
 
Either name your macro AutoExec or
Tools-Startup-Display Form: set it to a form that runs the necessary macro in the Open, Load or Timer event.

Keep in mind that both can be disabled by using Shift when opening the database.

Regards,

Dan
[pipe]
 
Hi Dan,

Thanks for your tip, but I want the macro to run everyday at the same time and I don't know how to set up a macro to run on a timer event. Could you help me on this please.

Thanks,

Andre
 
Could you set a timer to run every 24 hours beginning with the time that you want the program to run? You wouldn't be setting an absolute time, eg, "2:00 am", but you would start at 2:00 am and use a timer control to open the program every 24 hours after that. You probably thought of that already.
 
A simple solution: Task Scheduler in Windows. Set it to open the database when you want the macro to run and that's it...


Regards,
Dan
[pipe]
 
Hi Dan,

I already tryed to open the database with the task scheduler, but with the access compiler I cannot even open the database... If you know how to open a file with the access compiler with the task manager it would be great.

Thanks for your tips !

Andre
 
Can you open the database through a shortcut? Or from File-Open?

Dan
[pipe]
 
Yes, If I double-click on it, the files opens with the access, but if I open with the task scheduler it does not open...

Andre
 
Have you tried the Task scheduler without the command line for macro?

"C:\(....)\msaccess.exe" "C:\(...)\hghdsg.mdb"

It should work...

Dan
 
yes, I've tryed without the macro command line... but no luck...

Thanks,

Andre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top