Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: RE: Scheduled Runtimes in Access


Message #1 by mkneill@y... on Wed, 14 Nov 2001 00:51:20
When I try your suggestion, I get a vb error:

 Compile Error - Type Delaration Character does not match 

declared "datatype"



I copied the code direct from your post.  Any ideas or suggestions?

Thanks



-Mark







> You can use the Scheduled Tasks program in Control Panel to run the

> program automatically.  You then pass a command line argument to your

> program to have it perform the tasks you want it to.

> 

> 1. Just run the Scheduled Tasks Wizard and follow the prompts. 2. After

> you have run the wizard, open the task you just created and add a

> command line argument at the end of the "Run:" field.  For example: If I

> want to automatically run an Access db called MyDB, the "Run:" field

> would have the following in it: "C:\Program Files\Microsoft

> Office\Office\msaccess.exe" "U:\Work\MyDB" /cmd Autorun a. The

> "C:\Program Files\Microsoft Office\Office\msaccess.exe" tells the

> program which Access program to use (I have Access 97 and Access 2000 my

> computer. b. The "U:\Work\MyDB" is the name of the database and it's

> directory c. /cmd Autorun is the command line argument the database will

> use. 3. Add code to your program to recognize the command line argument

> "Autorun".  I always have a form open automatically in my programs, so

> in the Form_Open event, I add code for the program to process data when

> the command line has "Autorun".  For example:

> 

> Private Sub Form_Open(Cancel As Integer)

> 

>     ' If the program is opened through the Windows Task Scheduler then _

> 	automatically run the program.

>     If Command$ = "AutoRun" Then

> 

> 	' cmdRunApp is a button that, when pressed processes data

>         	cmdRunApp_Click

> 

> 	' Quit the program after processing is complete

> DoCmd.Quit

>     End If

> 

> End Sub

> 

> I hope this helps

> 

> John Ruff - The Eternal Optimist :-)

> 

> -----Original Message-----

> From: brose@u... [mailto:brose@u...] 

> Sent: Wednesday, August 15, 2001 6:42 PM

> To: Access

> Subject: [access] Scheduled Runtimes in Access

> 

> Is there a way to schedule Access to run queries or reports at specific 

> times? Can you have it automatically run a report on a repeated schedule

> 

> each week? If there is not a way in Access is there some outside plugin

> or 

> tool that can do this functionality within Access? Thanks for the help.

> 

Message #2 by "John Ruff" <papparuff@c...> on Thu, 15 Nov 2001 12:47:58 -0800
This is a multi-part message in MIME format.



------=_NextPart_000_0011_01C16DD3.C17BFD20

Content-Type: text/plain;

	charset="us-ascii"

Content-Transfer-Encoding: 7bit



Mark,



I apologize, I inadvertently provided you with an error for the Task

Scheduler.



Instead of /cmd Autorun I should have said /cmd "Autorun"



The word Autorun must be in quotes.  That is why you are getting the

mismatched datatyp



Again, I apologize







John Ruff - The Eternal Optimist :-) 











-----Original Message-----

From: mkneill@y... [mailto:mkneill@y...]

Sent: Wednesday, November 14, 2001 12:51 AM

To: Access

Subject: [access] RE: Scheduled Runtimes in Access





When I try your suggestion, I get a vb error:

 Compile Error - Type Delaration Character does not match

declared "datatype"



I copied the code direct from your post.  Any ideas or suggestions?

Thanks



-Mark







> You can use the Scheduled Tasks program in Control Panel to run the

> program automatically.  You then pass a command line argument to your

> program to have it perform the tasks you want it to.

>

> 1. Just run the Scheduled Tasks Wizard and follow the prompts. 2.

> After you have run the wizard, open the task you just created and add

> a command line argument at the end of the "Run:" field.  For example:

> If I want to automatically run an Access db called MyDB, the "Run:"

> field would have the following in it: "C:\Program Files\Microsoft

> Office\Office\msaccess.exe" "U:\Work\MyDB" /cmd Autorun a. The

> "C:\Program Files\Microsoft Office\Office\msaccess.exe" tells the

> program which Access program to use (I have Access 97 and Access 2000

> my computer. b. The "U:\Work\MyDB" is the name of the database and

> it's directory c. /cmd Autorun is the command line argument the

> database will use. 3. Add code to your program to recognize the

> command line argument "Autorun".  I always have a form open

> automatically in my programs, so in the Form_Open event, I add code

> for the program to process data when the command line has "Autorun". 

> For example:

>

> Private Sub Form_Open(Cancel As Integer)

>

>     ' If the program is opened through the Windows Task Scheduler then

_

>       automatically run the program.

>     If Command$ = "AutoRun" Then

>

>       ' cmdRunApp is a button that, when pressed processes data

>               cmdRunApp_Click

>

>       ' Quit the program after processing is complete

> DoCmd.Quit

>     End If

>

> End Sub

>

> I hope this helps

>

> John Ruff - The Eternal Optimist :-)

>

> -----Original Message-----

> From: brose@u... [mailto:brose@u...]

> Sent: Wednesday, August 15, 2001 6:42 PM

> To: Access

> Subject: [access] Scheduled Runtimes in Access

>

> Is there a way to schedule Access to run queries or reports at

> specific

> times? Can you have it automatically run a report on a repeated

schedule

>

> each week? If there is not a way in Access is there some outside

> plugin or tool that can do this functionality within Access? Thanks

> for the help.

>



---

You are currently subscribed to access as: papparuff@c... To

unsubscribe send a blank email to $subst('Email.Unsub')
















Message #3 by Mark Neill <mkneill@y...> on Thu, 15 Nov 2001 13:10:49 -0800 (PST)
--0-684159534-1005858649=:13871

Content-Type: text/plain; charset=us-ascii





 no problem..I figured it out... Thanks for the tip.

  John Ruff <papparuff@c...> wrote: 

Mark,



I apologize, I inadvertently provided you with an error for the Task Scheduler.



Instead of /cmd Autorun I should have said /cmd "Autorun"



The word Autorun must be in quotes.  That is why you are getting the mismatched datatyp



Again, I apologize







John Ruff - The Eternal Optimist J 











-----Original Message-----

From: mkneill@y... [mailto:mkneill@y...]

Sent: Wednesday, November 14, 2001 12:51 AM

To: Access

Subject: [access] RE: Scheduled Runtimes in Access





When I try your suggestion, I get a vb error:

 Compile Error - Type Delaration Character does not match

declared "datatype"



I copied the code direct from your post.  Any ideas or suggestions? Thanks



-Mark







> You can use the Scheduled Tasks program in Control Panel to run the

> program automatically.  You then pass a command line argument to your

> program to have it perform the tasks you want it to.

>

> 1. Just run the Scheduled Tasks Wizard and follow the prompts. 2.

> After you have run the wizard, open the task you just created and add

> a command line argument at the end of the "Run:" field.  For example:

> If I want to automatically run an Access db called MyDB, the "Run:"

> field would have the following in it: "C:\Program Files\Microsoft

> Office\Office\msaccess.exe" "U:\Work\MyDB" /cmd Autorun a. The

> "C:\Program Files\Microsoft Office\Office\msaccess.exe" tells the

> program which Access program to use (I have Access 97 and Access 2000

> my computer. b. The "U:\Work\MyDB" is the name of the database and

> it's directory c. /cmd Autorun is the command line argument the

> database will use. 3. Add code to your program to recognize the

> command line argument "Autorun".  I always have a form open

> automatically in my programs, so in the Form_Open event, I add code

> for the program to process data when the command line has "Autorun". 

> For example:

>

> Private Sub Form_Open(Cancel As Integer)

>

>     ' If the program is opened through the Windows Task Scheduler then _

>       automatically run the program.

>     If Command$ = "AutoRun" Then

>

>       ' cmdRunApp is a button that, when pressed processes data

>               cmdRunApp_Click

>

>       ' Quit the program after processing is complete

> DoCmd.Quit

>     End If

>

> End Sub

>

> I hope this helps

>

> John Ruff - The Eternal Optimist :-)

>

> -----Original Message-----

> From: brose@u... [mailto:brose@u...]

> Sent: Wednesday, August 15, 2001 6:42 PM

> To: Access

> Subject: [access] Scheduled Runtimes in Access

>

> Is there a way to schedule Access to run queries or reports at

> specific

> times? Can you have it automatically run a report on a repeated schedule

>

> each week? If there is not a way in Access is there some outside

> plugin or tool that can do this functionality within Access? Thanks

> for the help.

>




You are currently subscribed to access as: papparuff@c... 
















---------------------------------

Do You Yahoo!?

Find the one for you at Yahoo! Personals.



  Return to Index