ACC: New SQL Records Appear Deleted Until Recordset ReopenedLast reviewed: May 20, 1997Article ID: Q135379 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. When you add a record to an SQL table using Visual Basic for Applications, if the table's unique index field has a default value, and you do not assign a value to that field, the new record appears deleted until you reopen the SQL table. If you try to obtain a value from the new record, you receive the following error message:
Run-time error '3167' Record is deleted. RESOLUTIONWhen you open the SQL table using Visual Basic code, include the dbSeeChanges option, as in the following example:
Set rs = db.OpenRecordset("TestTable", dbOpenDynaset, dbSeeChanges)The dbSeeChanges option ensures that any newly added records that contain a default value in the unique index field are available in the current recordset.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
REFERENCESFor more information about the OpenRecordset method, search the Help Index for "OpenRecordset," and then "OpenRecordset method," or ask the Microsoft Access 97 Office Assistant. |
Keywords : kberrmsg kbusage OdbcProb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |