Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Run-Time Error 3622

Run-Time Error 3622

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"), dbFailOnError + dbSeeChanges
End If
End If

I've got the above code tied to a button in Access 2010.  The subform is a SQL Table.  When I highlight a row in the subform (SQL Table) and hit the 'delete' button, the row should delete.  However, I am getting a
Run-Time error '3622'  You must use dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.

I am clearly using dbSeeChanges so I'm not sure what the problem is.  Any help is greatly appreciated.

RE: Run-Time Error 3622

Hi.  I changed the code to the following and now working great!!

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
SQ = "DELETE FROM dbo_COMPLIANCE_RESTR_CATEG WHERE ID = " & Me.RLCatssubform1.Form.Recordset.ID & ";"
DoCmd.SetWarnings (warningsoff)
 DoCmd.RunSQL (SQ), dbFailOnError Or dbSeeChanges


End If
End If

Red Flag This Post

Please let us know here why the post below is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close