ACC2002: Row Fix-Up Does Not Update Other Rows When Data on the Primary Side Is Edited (282348)
The information in this article applies to:
This article was previously published under Q282348 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
When you create a query (whether it is a function, a view, or a stored procedure) based on a one-to-many relationship between two tables, and then you edit data in one record of the primary table (the "one" side), the changes are not propagated as expected to the same field in other rows of the view.
CAUSE
This behavior occurs because the query does not include all key fields from the tables on which it is based.
RESOLUTION
To resolve this issue, include all key fields in the query from tables with one-to-many joins. To do this for a view, follow these steps:
- Open the sample project NorthwindCS.adp.
- Under Objects, click Queries, and then double-click Create view in designer.
- In the Add Table dialog box, add Categories and Products, and then click Close.
- Add CategoryID from the Categories field list, and then add ProductID and CategoryID from the Products field list.
- Save the view, and then click the Run button on the toolbar.
- Change the first occurrence of "Beverages" to "Drinks," and then move off the record.
Note that all occurrences of "Beverages" have been changed to "Drinks."
The steps for functions and stored procedures are the same.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbprb KB282348 |
---|
|