HOW TO: Change the Caption of a Control on a Data Access Page in Access 2000

This article was previously published under Q207744
This article has been archived. It is offered "as is" and will no longer be updated.
Novice: Requires knowledge of the user interface on single-user computers.

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

IN THIS TASK

SUMMARY
This article describes three methods that you can use to change the caption of a control on a data access page. These three methods are:
  • Changing the InnerText property of the control
  • Directly editing the control
  • Editing the underlying HTML that defines the control
NOTE: Not all controls have an InnerText property that you can modify. The controls that do have an InnerText property are as follows:
  • Label
  • Marquee
  • Bound HTML
  • Option Button
  • Check Box
  • Command Button
back to the top

Method 1: Changing the InnerText Property of the Control

On a data access page, the InnerText property of a control is the equivalent of the Caption property of a control on a form. To change the value of the InnerText property for a control on a data access page, follow these steps:
  1. Open the data access page in Design view.
  2. Select the control whose caption you want to change.
  3. If the property sheet is not already displayed, click Properties on the View menu.
  4. Click the Other tab, and then change the value of the InnerText property.
back to the top

Method 2: Directly Editing the Control

You can also edit the control directly. To do so, follow these steps:
  1. Select the control whose caption you want to change.
  2. Click inside the control.
  3. Type the text that you want.
back to the top

Method 3: Editing the Underlying HTML That Defines the Control

You can also edit the HTML tags that define the control. Each control on a data access page is defined by the HTML tags behind the page. Although you can change most of the properties for each control through the property sheet of that control, you can also change the properties by directly editing the HTML. For an example of how to do so, follow these steps:
  1. In the Database window, click Pages under Objects, and then click New.
  2. In the New Data Access Page dialog box, click Design View, and then click OK.
  3. If the toolbox is not displayed, click Toolbox on the View menu.
  4. Add a label control to the data access page, click inside the label control, and then change the text to CategoryID.
  5. On the Tools menu, point to Macro, and then click Microsoft Script Editor.
  6. On the View menu, point to Other Windows, and then click Document Outline.
  7. Select the control that you want in the Document Outline Window. This puts the focus on the HTML tags that make up the control in the Editor pane. The following is sample HTML code for a label control:
    <SPAN class=MSTheme-Label id=Label0style="HEIGHT: 16px; LEFT: 2.208in; OVERFLOW: hidden; PADDING-LEFT: 1px; POSITION: absolute; TOP: 0.5in; WIDTH: 96px" title=Label0><P>CategoryID</P><P>&#xa0;</P></SPAN>					
  8. The text between the HTML tags, in this case CategoryID, is the caption for the control. Change this text to the text that you want.
  9. Save your changes, and then quit the Script Editor. Note that the caption reflects the change that you made to the HTML code.
back to the top
inf Inner Text
Properties

Article ID: 207744 - Last Review: 12/05/2015 10:47:28 - Revision: 2.0

Microsoft Access 2000 Standard Edition

  • kbnosurvey kbarchive kbhowto kbhowtomaster kbdap KB207744
Feedback