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



The information in this article applies to:

  • Microsoft Access 2000

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

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.

Modification Type:MajorLast Reviewed:12/12/2002
Keywords:AccDAP DAPHowTo kbDAP kbdta KB263650