Microsoft KB Archive/263650

= ACC2000: How to Use the UniqueTable Property of a Data Access Page =

Article ID: 263650

Article Last Modified on 12/12/2002

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q263650



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

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



SUMMARY
A data access page that is based on a query or view that has more than one table will not be automatically updateable even if the underlying record source is updateable. To make the underlying record source updateable from the data access page, you can use the UniqueTable property to specify the name of the table that will be updateable. However, the UniqueTable property can specify only one table from the underlying record source. All remaining tables in the underlying record source cannot be updated.

For example, if a data access page is based on an updateable query that uses the Customers and the Orders tables in the sample database Northwind.mdb, only one of the two tables can be updated in that data access page. You can specify either Customers or Orders in the group's UniqueTable property, and then that table's fields can be updated. If you specify no value for the UniqueTable property, neither table will be updateable.



MORE INFORMATION
For an example of how to create an updateable data access page based on a record source with multiple tables, follow these steps:  Open the sample database Northwind.mdb. In the Database window, click Queries under Objects, and then click New. In the New Query dialog box, click Design View, and then OK. Add both the Customers and Orders tables to the query. Add the following fields from the Customers and Orders tables to the query design grid:  Customers: CustomerID</li> Customers: CompanyName</li> Orders: OrderID</li> Orders: OrderDate</li></ul>

</li> On the File menu, click Save. Save the query as PageQuery.</li> In the Database window, click Pages under Objects, and then click New.</li> In the New Data Access Page dialog box, click Page Wizard, click the PageQuery query in the Choose the table or query where the object's data comes from box, and then click OK.</li> Once in the wizard, click the >> button to move all the available fields to the Selected Fields box, and then click Finish.

Note that when the new page is created, the Go To New Record button on the navigation bar is unavailable (is dimmed).</li> On the View menu, click Design View.</li> Click the header section of the page.</li> If the property sheet is not displayed, click Properties on the View menu.</li> In the property sheet, click the Data tab, and then set the UniqueTable property to Customers.</li> On the View menu, click Page View.</li> Note that the Go To New Record button is now available.</li></ol>

<div class="references_section">