Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbseechanges option with Openrecordset Error 1

Status
Not open for further replies.

Sydney1

Technical User
Jul 14, 2004
156
US
Hi,

Happy new year to everybody.

I have the following code
Code:
Set MyDB = CurrentDb
        Set MyTable = MyDB.OpenRecordset("tblLoanSteps", , dbSeeChanges)
        MyTable.AddNew
        MyTable("litigationID") = Forms!frmLitigationEntry!txtLitigationID
        MyTable("ScheduleDate") = Forms!frmLitigationEntry![txtstartDate]: MyTable("Steps") = "1": MyTable("Critical") = "1"
        MyTable.Update

which adds a record to a table. But every other time I run the code I get the following error "You must use the Dbseechanges option with Openrecordset when accessing a SQL Server table that has an identity column."

I've used the dbseechanges option, but am still getting the error every other time I run the code. Any help would be greatly appreciated.

Thanks

Sydney
 
I believe dbseechanges only works for a dynaset type recordset.

Code:
 Set mytable = mydb.OpenRecordset("tblLoanSteps", dbOpenDynaset, dbSeeChanges)
 
Thanks for the reply. You're exactly right. I put in the dbOpenDynaset and it worked fine.

Thanks again for the help.

Sydney
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top