Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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).

↑ Back to the top


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.

↑ Back to the top


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:
  1. Open the sample database Northwind.mdb.
  2. In the Database window, click Queries under Objects, and then click New.
  3. In the New Query dialog box, click Design View, and then OK.
  4. Add both the Customers and Orders tables to the query.
  5. Add the following fields from the Customers and Orders tables to the query design grid:
    • Customers: CustomerID
    • Customers: CompanyName
    • Orders: OrderID
    • Orders: OrderDate

  6. On the File menu, click Save. Save the query as PageQuery.
  7. In the Database window, click Pages under Objects, and then click New.
  8. 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.
  9. 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).
  10. On the View menu, click Design View.
  11. Click the header section of the page.
  12. If the property sheet is not displayed, click Properties on the View menu.
  13. In the property sheet, click the Data tab, and then set the UniqueTable property to Customers.
  14. On the View menu, click Page View.
  15. Note that the Go To New Record button is now available.

↑ Back to the top


References

For more information about the UniqueTable property, click Microsoft Access Help on the Help menu, type uniquetable property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB263650, daphowto, accdap, kbdta, kbdap

↑ Back to the top

Article Info
Article ID : 263650
Revision : 1
Created on : 12/12/2002
Published on : 12/12/2002
Exists online : False
Views : 271