HOW TO: Change the Caption of a Control on a Data Access Page in Access 2000 (207744)
The information in this article applies to:
This article was previously published under Q207744 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 TASKSUMMARY
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:
- Open the data access page in Design view.
- Select the control whose caption you want to change.
- If the property sheet is not already displayed, click Properties on the View menu.
- 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:
- Select the control whose caption you want to change.
- Click inside the control.
- 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:
- 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 a label control to the data access page, click inside the label control, and then change the text to CategoryID.
- On the Tools menu, point to Macro, and then click Microsoft Script Editor.
- On the View menu, point to Other Windows, and then click Document Outline.
- 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=Label0
style="HEIGHT: 16px; LEFT: 2.208in; OVERFLOW: hidden; PADDING-LEFT: 1px;
POSITION: absolute; TOP: 0.5in; WIDTH: 96px"
title=Label0><P>CategoryID</P><P> </P></SPAN>
- 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.
- 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
Modification Type: | Major | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbDAP kbhowto kbHOWTOmaster KB207744 kbAudEndUser kbAudITPro |
---|
|