Error Message

Access Virgin

Registered User.
Local time
Today, 10:30
Joined
Apr 8, 2003
Messages
77
I created a database and used this code to populate a continuous form. It works fine. I have now decided to use a SQL Server backend. When I go to open the form now I get an error message, 3622, "use dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column". I have checked on MSDN but still cant resolve the problem.

If Me.ProjRefNo <> "" Or Not IsNull(Me.ProjRefNo) Then
Dim dbs As Object, strSQL As String
' Force the CaseNo table to save the new case no.
DoCmd.RunCommand acCmdSaveRecord
Set dbs = CurrentDb
strSQL = "INSERT INTO dbo_tblAnswers (QuestionID,ProjRefNo) " _
& "SELECT QuestionID, '" & Me.ProjRefNo & "' AS ProjRefNo " _
& "FROM dbo_tblCheckListQuestions"
dbs.Execute strSQL
dbs.Close
Set dbs = Nothing

Me.frm_MonitoringChecklist_Section1.Form.Requery


End If
 

Users who are viewing this thread

Back
Top Bottom