Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC: Error Message Using OutputTo to Output a Report to Another Format


View products that this article applies to.

This article was previously published under Q226526
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

↑ Back to the top


Symptoms

When you use the OutputTo action or method to output a report to another format, you receive one of the following errors:
Run-time error '2024':

The report snapshot was not created because you do not have enough free disk space for temporary work files.
-or-
Run-time error '2302':

Microsoft Access can't save the output data to the file you've selected.
-or-
Run-time error '2282':

The formats that enable you to output data as a Microsoft Excel, rich-text format, MS-DOS text, or HTML file are missing from the Windows Registry.

↑ Back to the top


Cause

You may receive one of the errors that is mentioned in the "Symptoms" section if any one of the following is true of the OutputFile argument of the OutputTo action or method:
  • You did not specify a file name.

    -or-
  • The file name that you supplied contains an invalid character (!@#$%^&*():;).

    -or-
  • The path that you specify does not exist.

↑ Back to the top


Resolution

To work around this problem, do the following:
  • Modify the OutputFile argument of the OutputTo action or method to include a file name.
  • Make sure that the file name does not include any invalid characters.
  • Make sure that you are using the correct path.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Open the sample database Northwind.mdb.
  2. Create a new module and type the following procedure:
    Sub OutputSnapshot()
       DoCmd.OutputTo acOutputReport, "Alphabetical List of Products", _
        acFormatSNP, "C:\My Documents\", True
    End Sub
    						
    NOTE: This procedure assumes that you have a "My Documents" folder on the drive C.
  3. Press F5 to run the procedure.

    Note that you receive the first error listed in the "Symptoms" section.

↑ Back to the top


References

For more information about the OutputTo action, click Microsoft Access Help on the Help menu, type OutputTo action in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB226526, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 226526
Revision : 4
Created on : 6/24/2004
Published on : 6/24/2004
Exists online : False
Views : 444