By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

After Update Event Procedure not working after upsizing to sql server

P: 44
After Update Event Procedure on a form is not working after upsizing database to SQL server. Anything to add in below code as it generate run time error 3622 "You must use the dbSeeChanges option with OpenRecordSet when accessing a SQL Server table that has an IDENTITY column."

Please help.. thanks

Expand|Select|Wrap|Line Numbers
  1.  Private Sub Form_AfterUpdate()
  2.      Dim db As Database
  3.  
  4.          Set db = CurrentDb
  5.          db.Execute "INSERT INTO [tblFinding_Backup] " & " SELECT * FROM [tblFinding] WHERE " & " [tblFinding].[ID]=" & Me![ID] & ";"
  6.          Set db = Nothing
  7.  
  8.      End Sub 
Feb 10 '09 #1
Share this Question
Share on Google+
5 Replies


Expert 100+
P: 1,287
Haven't done this myself, but you may need to specify the columns to insert into. You might also be able to use SELECT INTO.
Feb 10 '09 #2

P: 44
Need some more help to work around regarding error 3622 as stated above.

Thanks
Feb 10 '09 #3

DonRayner
Expert 100+
P: 489
@Zeeshan7
Try line 5 like this

Expand|Select|Wrap|Line Numbers
  1. db.Execute "(INSERT INTO [tblFinding_Backup] " & " SELECT * FROM [tblFinding] WHERE " & " [tblFinding].[ID]=" & Me![ID] & ";"));, dbopendynaset, dbseechanges)"
Feb 10 '09 #4

P: 44
Now it gives (Compile error: Syntax error)
Please advice. Thanks
Feb 11 '09 #5

P: 44
I have used append query as an alternate.
Thanks
Feb 11 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.