John Ruff
papparuff at comcast.net
Sun Apr 25 11:02:53 CDT 2004
The Windows Task Scheduler is a great tool coupled with Access' startup command-line options ("Startup command-line options" in help) are perfect for what you want to do. The Task Scheduler is used to open the Access program that runs the report each Wed at 10:00 am and the command-line options tells the program to perform the task when the command-line option is invoked. When you start the task scheduler you will want to tell it where the MSAccess program is and what database do you want to start. Typically it will look something like this: (careful about wordwrap) "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\Blv2-dmt\LeadGen\BZUSPSMTA01\Import_BZTables_Ver_11_XP.mdb" /cmd Autorun (In my sample line above I use the word Autorun as my command-line keyword but you can use any word you want) Next you will need to do some coding in your Access program to recognize the cmd Autorun command-line option. I typically use a hidden splash screen and in the form's OnLoad Event I would place the code that would print the report and then close the program once the printing is done. Private Sub Form_Load() Dim strDocName As String If Command = "Autorun" Then ' Print the document strDocName = "rpt_Metrics" DoCmd.OpenReport strDocName, acNormal ' Quit the program DoCmd.Quit End If End Sub John V. Ruff - The Eternal Optimist :-) "Commit to the Lord whatever you do, and your plans will succeed." Proverbs 16:3 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Morrill Sent: Saturday, April 24, 2004 6:43 AM To: AccessD at databaseadvisors.com Subject: [Accessd] Running a report each Wednesday at 10:00 am Anybody point me in a direction here? How does one run an A2K report once a week -say on Wednesday at 10:00AM - without human intervention? Access will be up and running in a particular database, in a particular form when the time trigger is go off. Thank you. Bill -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com