ACC2000: Can't Use OutputTo Method with Form or Report Modules (200638)
The information in this article applies to:
This article was previously published under Q200638 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you use the OutputTo method in Visual Basic for Applications to output a form or report module to a text file, you may receive the following error message:
Run-time error '2289'
Microsoft Access can't output the module in the requested format.
CAUSE
You cannot use the OutputTo method in Visual Basic for Applications to output form or report modules. Form or report modules are class modules
that contain code that is local to the form or report. They do not appear
in the Database window as standard modules do. You can only output modules
that appear in the Database window with the OutputTo method.
RESOLUTION
When you use the OutputTo method, only output standard modules and class modules that are not associated with any form or report.
NOTE: A workaround for this is to copy all the code from the form or report module and paste it into a word processing document; then you can save the word processing document as a text file.
REFERENCESFor more information about the OutputTo method, click Microsoft Access Help on the
Help menu, type OutputTo Method in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
Modification Type: | Major | Last Reviewed: | 12/12/2002 |
---|
Keywords: | kberrmsg kbprb kbProgramming KB200638 |
---|
|