OutputTo Error command or action not available. 
Author Message
 OutputTo Error command or action not available.

I have an automation process that does the following.

    Windows scheduler opens and access database.
    Database has a form that loads when it opens
    Form has a procedure that runs on "Open" event
            Code for automated report generation and e-mailing
                Output Report to Unique File Name
                E-Mail Report
                Loop Until End of EMail List
   End of Code exits the access database.

Problem area:
    DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF, stFile1

When the program runs I get a the following error:
    The command or action 'OutputTo' isn't available now

*** Weird Circumstance ***
If I open the Access Database and bypass the startup functions then open the
automation form by double clicking on it everything runs correctly.  The
reports are generated and the e-mails go out.
**********************

What am I missing.  Do I need to move my code to a different event besides
on-open?

Please help.  This has been very frustrating.

Thanks in advance.

Lost in Michigan with no Snow.



Sun, 12 Jun 2005 00:15:16 GMT  
 OutputTo Error command or action not available.
I solved this myself:
    Opened another form blank with nothing on it.  Because the form had not
opened yet the Outputto function was not availabel.  So by opening another
form in code it made the function become availabe.

If it weren't for programming quarks like this I would have way too much
time on my hands.  As it is, I am gainfully employed :-)


Quote:
> I have an automation process that does the following.

>     Windows scheduler opens and access database.
>     Database has a form that loads when it opens
>     Form has a procedure that runs on "Open" event
>             Code for automated report generation and e-mailing
>                 Output Report to Unique File Name
>                 E-Mail Report
>                 Loop Until End of EMail List
>    End of Code exits the access database.

> Problem area:
>     DoCmd.OutputTo acOutputReport, stDocName, acFormatRTF, stFile1

> When the program runs I get a the following error:
>     The command or action 'OutputTo' isn't available now

> *** Weird Circumstance ***
> If I open the Access Database and bypass the startup functions then open
the
> automation form by double clicking on it everything runs correctly.  The
> reports are generated and the e-mails go out.
> **********************

> What am I missing.  Do I need to move my code to a different event besides
> on-open?

> Please help.  This has been very frustrating.

> Thanks in advance.

> Lost in Michigan with no Snow.



Tue, 14 Jun 2005 02:46:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. The command or action Save Record is not available now

2. The command or action 'OutputTo' isn't available now.

3. Help with OutputTo SendTo Action/Method - Multi-post

4. SaveRecord command not available-Access 2000

5. Word 97 VB command button .trackrevision property not available

6. Not enough storage is available to process this command

7. How do I Insert the OutputTo / TransferSpreadsheet command ?

8. ACC97: OutputTo-RTF does not look like Print/Preview

9. The command or action "Save Record" is not available now.

10. Error Message Function not available

11. Error 5918 - The property or method is not available on this system

12. Runtime Error 462: server not available

 

 
Powered by phpBB® Forum Software