Article ID: 251289 - Last Review: July 15, 2004 - Revision: 2.1 ACC2000: New Row in Linked SQL Server Table Disappears or Appears as a Duplicate of Last RecordThis article was previously published under Q251289 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb). On This PageSYMPTOMS
When you add a new record to a linked Microsoft SQL Server table and then move to a different record, you may notice one of the following symptoms:
When you press the TAB key to move to the next new record after entering any part of a new record in a table, the record you just typed disappears.When you type a complete new record in a table and then move to an existing record, the record you typed disappears.When you type only part of a new record into a table and then move off that record to an existing record, your new record disappears, and the last record in the table appears to be duplicated.When you type any part of a record in a form, and then leave the record, the information you type disappears. IMPORTANT: Data is not actually lost. Do not try to add the record again; it does exist. Do not try to delete the apparent duplicate record. By deleting it, you delete the original record, which appears to be duplicated, not the record you just added.
CAUSE
If the SQL Server table has an identity column, when you try to add a record, you instead see what appears to be a duplicate of the previous record. The new record does not display the correct data until you refresh the recordset. This behavior is related to the way Microsoft Access requeries the SQL Server database.
RESOLUTION
To resolve this issue, obtain the latest Microsoft Jet 4.0 service pack update.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
239114
(http://support.microsoft.com/kb/239114/
)
How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine
To work around this problem, use any of the following three methods.
Using an Access ProjectYou can use an Access project instead of an Access database. By using an Access project, you do not need to have linked tables to connect to a SQL Server database.For additional information about converting your Access database to an Access project, click the article numbers below to view the articles in the Microsoft Knowledge Base: 241743
(http://support.microsoft.com/kb/241743/EN-US/
)
ACC2000: "Access 2000 Upsizing Tools" White Paper Available in Download Center
250616
(http://support.microsoft.com/kb/250616/EN-US/
)
ACC2000: How to Use DTS to Export Data from a Microsoft Access Database to a SQL Server Database
Using Forms in an Access DatabaseIf you see this behavior in a form, use Microsoft Visual Basic for Applications code for the BeforeInsert and AfterInsert events to automatically requery the data and move the form to the newly added record. With the sample code below, you can add to the events to automatically refresh the record on the form.NOTE: With this method you may notice you have to move off a new record twice. That is, when you add a new record and then press the TAB key or one of the record navigation buttons to add another new record or move to the previous record, you have to press the record navigation button a second time to get to the appropriate record. This does not affect closing the form. Using Tables in a MDBIf you see this behavior in a table, you can manually resort the table or close and reopen the table.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in the latest Microsoft Jet 4.0 service pack.
MORE INFORMATIONSteps to Reproduce Behavior
| Article Translations
|

Back to the top
