Microsoft KB Archive/142478

= ACC2: Output to RTF or XLS Contains Unwanted Labels =

Article ID: 142478

Article Last Modified on 6/25/2002

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q142478



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



SYMPTOMS
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:

 Open the report in Design view, remove the label control, and then replace it with a text box control.  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: ="" 



STATUS
This behavior no longer occurs in Microsoft Access version 7.0.



Steps to Reproduce Behavior
 Open the sample database NWIND.MDB.</li> Open the Freight Charges report in Design view.</li>  Set the Visible property to No for the following controls in the page header section:

<pre class="fixed_text">     Label: Name: Text0 Caption: Company Name: Visible: No     Label: Name: Text1 Caption: Order ID: Visible: No                       </li> From the File menu, choose Print Preview. Note that the Company Name and Order ID labels are invisible in the page header section.</li> From the File menu, choose Output To.</li> In the Select Format box, select Rich Text Format (*.rtf), and then choose the OK button.</li> In the File Name box, type Test.rtf, and then choose OK.</li> Close Microsoft Access. When you are asked to save changes to the Freight Charges report, click No.</li> 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.</li></ol>

<div class="references_section">