ACC2: Output to RTF or XLS Contains Unwanted Labels

ID: Q142478


The information in this article applies to:


SYMPTOMS

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

When you output a report to an RTF or XLS file (by using the Output To command on the File menu), labels are included in the RTF file even though the Visible property of the labels is set to No.


RESOLUTION

You can use a text box control for the label instead of a label control. To do so, follow these steps:

  1. Open the report in Design view, remove the label control, and then replace it with a text box control.


  2. Set the text box's ControlSource property to the same value as the former label's Caption property. Be sure to enclose the text in quotation marks and precede it with an equal sign (=), for example:
    
          Text box:
             Name: Text0
             ControlSource: ="<Your label here>" 



STATUS

This behavior no longer occurs in Microsoft Access version 7.0.


MORE INFORMATION

Steps to Reproduce Behavior


  1. Open the sample database NWIND.MDB.


  2. Open the Freight Charges report in Design view.


  3. Set the Visible property to No for the following controls in the page header section:
    
          Label:
             Name: Text0
             Caption: Company Name:
             Visible: No
          Label:
             Name: Text1
             Caption: Order ID:
             Visible: No 


  4. From the File menu, choose Print Preview. Note that the Company Name and Order ID labels are invisible in the page header section.


  5. From the File menu, choose Output To.


  6. In the Select Format box, select Rich Text Format (*.rtf), and then choose the OK button.


  7. In the File Name box, type Test.rtf, and then choose OK.


  8. Close Microsoft Access. When you are asked to save changes to the Freight Charges report, click No.


  9. Open the Test.rtf file using a word processor that supports the RTF file format (such as Microsoft Word). Note that the Company Name and Order ID labels appear in the Test.rtf file.



REFERENCES

For more information about the Output To command, search for "Output To," and then "Output To Command (File Menu)" using the Microsoft Access Help menu.


Keywords          : kbusage OtpRtf 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 30, 1999