Microsoft KB Archive/203102

= ACC2000: Option Group Label Can Only Be Re-Associated in HTML =

Article ID: 203102

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q203102



This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you create an option group on a data access page, a label, which is associated with the control, is also created. By default, this label is placed on the upper-left portion of the option group control. If you delete this associated label, no property is available that you can use to re-associate a new label. However, you can modify the HTML behind the page to associated a new label with the option group.

NOTE: The ChildLabel property, which is typically used to associate a label to a specific control is not available for the option group control.



RESOLUTION
The HTML code that forms an option group on a data access page uses the FIELDSET tag. To create an associated label for this option group, a LEGEND tag must be nested inside a FIELDSET tag. This process takes place automatically when you use the toolbox to place an option group on the page. However, you can also carry out this process manually by modifying the HTML source. For an example of how to do so, follow these steps:  Open the sample database Northwind.mdb. In the Database window, click Pages under Objects, and then click New. In the New Data Access Page dialog box, click Design View, and then click OK. If the toolbox is not displayed, click Toolbox on the View menu. Add an option group to the page. By default, the name of the option group is Frame0, and the associated label's name is Frame0_Legend. Click Frame0_Legend, and then delete it.</li> On the Tools menu, point to Macro, and then click Microsoft Script Editor.</li> On the View menu, point to Other Windows, and then click Document Outline.</li> Select the Body object in the Document Outline window.</li>  Locate the FIELDSET tag within the BODY tag in the Script Editor window. The FIELDSET tag is several lines down from the BODY tag. Insert the following inside of the FIELDSET tag: <LEGEND id=Label0 style="PADDING-LEFT: 1px">MyOptionGroup</LEGEND> </li> On the File menu, click Save.</li> On the File menu, click Exit.

Note that there is now a new label placed on the option group that displays the text, "MyOptionGroup."</li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior

 * 1) Open the sample database Northwind.mdb.
 * 2) In the Database window, click Pages under Objects, and then click New.
 * 3) In the New Data Access Page dialog box, click Design View, and then click OK.
 * 4) If the toolbox is not displayed, click Toolbox on the View menu.
 * 5) Add an option group to the page.
 * 6) By default, the name of the option group is Frame0, and the associated label's name is Frame0_Label. Click Frame0_Label and delete it.

Note that now there is no property available that you can use to re-associate a new label.

Additional query words: pra

Keywords: kbbug kbdap kbpending KB203102

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.