Microsoft KB Archive/275093

= ACC2002: Unable to Set the Recordset Label of the Navigation Bar in Browse Mode =

Article ID: 275093

Article Last Modified on 9/26/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q275093



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

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



SYMPTOMS
The label on a record navigation bar of a data access page returns to its default when you click on the bar.



CAUSE
Setting the InnerText property does not change the template that is used to fill the record navigation control.



STATUS
This behavior is by design.



MORE INFORMATION
You cannot change the RecordsetLabel property at run-time.

Steps to Reproduce the Behavior
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

 Open the Northwind sample database. Create a new data access page that is based on the Categories table, and then add CategoryName field to the page.  Add a command button to the page, and then make the following property assignments:   Id: cmdNewRecord InnerText: New Record  In the Microsoft Script Editor, click the arrow in the Object box, and then click cmdNewRecord in the drop-down list.  Click the arrow in the Event box, and then click onclick in the drop-down list. Note that script similar to the following is inserted into the top of your HTML window: <script language=vbscript for=cmdNewRecord event=onclick>

</li>  Modify this script as follows: <script language=vbscript for=cmdNewRecord event=onclick> </li> Close the Microsoft Script Editor, click Yes to save changes, and then save the page with the default name of Page1.htm.</li> In page design, click Page View on the View menu, and then browse through the page. Note that the current label on the Categories navigation bar has text similar to:

Categories 1 of 8

</li> Click the New Record button and note that the navigation label now displays as New Category 1 of 1.</li> Click anywhere on the navigation bar and note that the label returns to the default display that you saw in step 7.</li></ol>

<div class="references_section">