ACC2002: Identity Increment Values Greater Than One Are Not Calculated Until the New Record Is Saved (282389)
The information in this article applies to:
This article was previously published under Q282389 Novice: Requires knowledge of the user interface on single-user computers.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
When you add a new record to a Microsoft Access project (.adp) table, and the primary key identity column has an increment value of 2 or more, the value in the primary key column appears to be incremented only by 1 until you save the record. When you save or commit the record, the primary key column value is calculated correctly by using the increment that you specified in the Identity Increment property.
CAUSE
This behavior occurs because the value of the primary key column identity is not calculated until the AfterUpdate or AfterCommitTransaction events have occurred.
RESOLUTION
In the case where, in a second table, you are generating records that use the value of the identity column in the current new record, be sure that you force the current new record to be saved before you create the dependent record. Otherwise, the dependent record may use the incorrect identity column value, which results in a data-integrity problem.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | kbbug kbpending KB282389 |
---|
|