• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Creating Multitable and Cros... > Updating Table Data with Queries

Updating Table Data with Queries

Many of the queries that you create with the Unique Records property set to Yes are updatable because you use Access SQL's DISTINCTROW modifier to create them. (Setting the Unique Records property to Yes causes Access to add the DISTINCTROW modifier to the query's SQL statement.) These queries create Recordset objects of the updatable Dynaset type. You cannot update a query unless you see the tentative (blank) append record (with the asterisk in the select button) at the end of the query result table. Queries that you create with the Unique Values property set to Yes create Recordset objects of the Snapshot type by substituting ANSI SQL's DISTINCT modifier. You cannot edit, add new records to, or otherwise update a Recordset object of the Snapshot type. The next few sections describe the conditions under which you can update a record of a table included in a query. The following sections also discuss how to use the Output Field Properties window to format a query data display and edits.

Note

You cannot set both the Unique Values and Unique Records properties to Yes—these choices are mutually exclusive. Setting Unique Values to Yes causes Access to include the DISTINCT modifier in the SQL statement for the query, resulting in a Recordset that cannot be updated. Setting the Unique Records property to Yes causes Access to include the DISTINCTROW modifier in the SQL statement, resulting in a Recordset that can be updated. In Access 97, the default setting of both the Unique Values and Unique Records properties is No.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint