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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run-time error 3662

Status
Not open for further replies.

daveinchicago

IS-IT--Management
Feb 13, 2012
19
US
run-time error 3622: You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an identity column.

I have the following code and am getting the above error. I am accessing SQL Server Tables. (this worked when using local tables)

Can anyone help? Thanks in advance...

If Not (Me.RLCatssubform1.Form.Recordset.EOF And Me.RLCatssubform1.Form.Recordset.BOF) Then
If MsgBox("Are you sure you want to Delete?", vbYesNo) = vbYes Then
CurrentDb.Execute "Delete from dbo_COMPLIANCE_RESTR_CATEG " & _
"where ID=" & Me.RLCatssubform1.Form.Recordset.Fields("ID")
Me.RLCatssubform1.Form.Requery
End If
End If

 
I updated the code to add

dbFailOnError + dbSeeChanges

to the delete statement and it works...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top