ACC: Print To File Option Inserts Unsupported Characters

ID: Q153759


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you print to a file by using the Print To File option in the Print dialog box, the file created with a Generic/Text Only printer driver contains characters not supported by Microsoft Windows 95.


RESOLUTION

There are two ways to work around this behavior. One way is to use the Print To File option in the Print dialog box, and then to edit the file manually by deleting the unsupported ASCII characters. However, the recommended way is to output the file to a text file. The following steps demonstrate this method:

  1. Open the sample database Northwind.mdb.


  2. Click the Reports tab, and then click New. In the New Report dialog box, click Design View, base the new report on the Categories table, and then click OK.


  3. If the Field List box is not displayed, click Field List on the View menu,.


  4. Drag the CategoryName field to the report's detail section.


  5. Close and save the report as Report1.


  6. Click the Macros tab, click New, and create the following macro:
    
          Macro Action
          ------------
          OutputTo
    
          Macro1 Actions
          --------------------------
          Object type: Report
          Object name: Report1
          Object format: MS-DOS Text
          Output file: C:\Test.txt
          Auto Start: No 


  7. Close and save the macro as Macro1.


  8. On the Tools menu, click Macro. In the Run Macro dialog box, select Macro1, and then click OK.


  9. Open the C:\Test.txt file in Notepad or another text editor. Note that there are no unsupported ASCII characters in the Test.txt file and that the spacing between the controls is close to what it was in Microsoft Access Print Preview.



MORE INFORMATION

The text file that the Print To File option creates contains unsupported ASCII characters in Microsoft Windows 95, and the formatting of the report does not resemble what you see in Print Preview in Microsoft Access.

Steps to Reproduce Behavior


  1. Open the sample database Northwind.mdb.


  2. Click the Reports tab, and then click New. In the New Report dialog box, click Design View, base the new report on the Categories table, and then click OK.


  3. If the Field List box is not displayed, click Field List on the View menu,.


  4. Drag the CategoryName field to the report's detail section.


  5. On the File menu, click Print.


  6. In the Print dialog box, select the Generic/Text Only printer driver. After selecting the Generic/Text Only driver, click Print To File, and then click OK.

    NOTE: If you do not have the Generic/Text Only driver installed, you must install the driver. Steps to install the Generic/Text Only printer driver are outlined in the "Steps to Install Printer Driver in Windows 95" section.


  7. When prompted, name the file, and then click OK.


  8. After the file has been saved, open the file in Notepad or another text editor. Note that there are unsupported characters. Also note that the file's formatting does not resemble the report's spacing in Microsoft Access.


Steps to Install Printer Driver in Windows 95


  1. Click the Windows 95 Start button, point to Settings, and then click Printers.


  2. Double-click the Add Printer icon. The Add Printer Wizard starts.


  3. Click Next in the Wizard startup screen.


  4. Click Next again.


  5. When prompted for a printer type, select Generic under the Manufacturers heading, and Generic/Text Only under the Printers heading. After selecting the manufacturer and printer, click Next.


  6. Click Next to accept the default printer port.


  7. Click Next to accept the default printer name and settings.


  8. Select No to print a test page, and then click Finish to have the wizard install the files for a Generic/Text Only printer driver.



REFERENCES

For more information about the OutputTo method, search for "OutputTo Method" using the Microsoft Access Help Index.


Keywords          : RptOthr 
Version           : 7.0 97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 27, 1999