Microsoft KB Archive/171954

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 10:05, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Microsoft Knowledge Base

ACC97: "OutputTo action was canceled" Error Msg in Run-Time App.

Last reviewed: July 25, 1997
Article ID: Q171954

The information in this article applies to:

  • Microsoft Access 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you try to output a file from your custom application by using the OutputTo method on a computer that never had Microsoft Access installed, you may receive the following error message:

   OutputTo action was canceled.

This behavior occurs when the OutputTo method does not contain the Outputfile argument. For example:

   DoCmd.OutputTo acOutputReport, "Report Name", acFormatRTF,,False

This behavior does not occur in the retail version of Microsoft Access.

CAUSE

In the retail version of Microsoft Access, if you leave the Outputfile argument blank, Microsoft Access will prompt you for an output file name. However, in a custom application this feature is not provided.

RESOLUTION

You must supply the information for the OutputTo Outputfile parameter for your custom application.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access 97 and open any database that contains a report.
  2. Create a new form in Design view and add a command button to the form. In the Property box for the command button, change the Name property to RptOutput.
  3. Type the following for the OnClick Event procedure for the command button:

    Private Sub RptOutput_Click()

            DoCmd.OutputTo acOutputReport, "<Report Name>", acFormatRTF,,False
           End Sub
    
  4. Close the module and save the form as frmForm1. Switch the frmForm1 form to Form view.
  5. Click the RptOutput button. Note that the OutputTo dialog box is displayed.
  6. Close the OutputTo dialog box. Click End to the OutputTo error message.
  7. Close the frmForm1 form.
  8. On the Tools menu, click Startup, and select the frmForm1 form in the Display Form list box. Click OK to close the Startup box.
  9. Close the database.
  10. Start the Microsoft Office 97 Developer Edition Tools Setup Wizard.
  11. On the Introduction screen, accept the default, and click Next.
  12. On the Add Files screen, add the database from step 1, click the "Set as Application's Main File" check box, and then click Next.
  13. On the Shortcuts screen, click Add. Click the Database Shortcut Properties tab and type a description for your shortcut. Click the Run-Time check box, and then click Next.
  14. Click Yes to the Setup Wizard message box. Click OK to the second Setup Wizard message box.
  15. Click Next three times, and type My OutPutTo Application in the "What is the name of your application?" box.
  16. Click Finish. Click No when asked if you want to save the template.
  17. After the disk images are completed, run setup for My OutPutTo Application on any computer.
  18. After the Setup program is finished, start the My OutPutTo Application.
  19. When the application opens to your Startup form, click the OutputTo button.

    Note that you receive the error message mentioned in the "Symptoms" section.

Keywords          : OtpProb kberrmsg kbusage
Version           : 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbprb
Solution Type     : Info_Provided

================================================================================



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 25, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.