April 2007
Beginner
573 pages
12h 41m
English
As you learned in Chapter 7, you have various ways to export data from Access to other formats. The OutputTo method allows exporting to various formats: HTML, RTF, TXT, XLS, and XLSB. The examples in this section will focus on a Web-centric example using HTML, but you could also use the OutputTo method to export to text files or other supported formats. Consult the Access Help documentation for additional information on these formats. The basic syntax for the OutputTo method is shown in the following code:
DoCmd.OutputTo ObjectType, ObjectName, OutputFormat, OutputFile, AutoStart, TemplateFile, Encoding
Various parameters can specify how the method should execute. The following table explains the use of each parameter.
| Parameter | Description |
|---|---|
| ObjectType | Type of object to be exported. See the help documentation for the complete list of objects. |
| ObjectName | Name of the object being exported. |
| OutputFormat | The format to which the object should be exported. |
| OutputFile | The full name, including the path, of the file to which the object should be exported. |
| AutoStart | Indication of whether the destination program is to start immediately. False is the default. |
| TemplateFile | The full name, including the path, of the file to use as a template. |
| Encoding | The type of character encoding format to use when outputting the text or HTML data. |
| OutputQuality | Type of output device to optimize for. The AcExportQuality constant specifies the type, and the default value is acExportQualityPrint. ... |
Read now
Unlock full access