D
dullster
We just migrated an Access 07 db to SQL for testing. When opening a form with
a sub form I am getting this error.
Run-time error '3622': You must use the dbSeeChanges option with
OpenRecordset when accessing a SQL Server table that has an IDENTITY column.
When I click Debug, this is the VBA that presents.
Private Sub Form_Load()
Dim cdb As Database
Dim rsParams As Recordset
Set cdb = CurrentDb
Set rsParams = cdb.OpenRecordset("SELECT * FROM app_parameters WHERE
param_name = 'base_directory'")
base_dir = rsParams("param_value")
If Not IsNull(Me.OpenArgs) Then
Dim strArgArray
strArgArray = Split(Me.OpenArgs, "|")
Select Case strArgArray(0)
Case "newSPfromWI"
DoCmd.GoToRecord , , acNewRec
Dim rs As Recordset
Set rs = cdb.OpenRecordset("SELECT * FROM [Customers Table]
WHERE CustomerID = " & strArgArray(1))
With Me
!CustomerID = rs("customerid")
!LastName = rs("lastname")
!FirstName = rs("firstname")
!Customeraddress = rs("mailingaddress")
!Customercity = rs("city")
!Customerstate = rs("state")
!Customerzip = rs("zip")
!PhoneNumber = rs("phonenumber")
![Parcel#] = strArgArray(2)
!Township = strArgArray(3)
!Town = strArgArray(4)
!Range = strArgArray(5)
!Qtr = strArgArray(6)
!Qtr2 = strArgArray(7)
!CountyAddress = strArgArray(8)
!Roadway = strArgArray(9)
!Bedrooms = strArgArray(10)
!DateIssued = strArgArray(11)
!PriorPermitDate = strArgArray(12)
End With
Set rs = Nothing
Case Else
End Select
End If
End Sub
I have tried several codes with no success. Any ideas?
a sub form I am getting this error.
Run-time error '3622': You must use the dbSeeChanges option with
OpenRecordset when accessing a SQL Server table that has an IDENTITY column.
When I click Debug, this is the VBA that presents.
Private Sub Form_Load()
Dim cdb As Database
Dim rsParams As Recordset
Set cdb = CurrentDb
Set rsParams = cdb.OpenRecordset("SELECT * FROM app_parameters WHERE
param_name = 'base_directory'")
base_dir = rsParams("param_value")
If Not IsNull(Me.OpenArgs) Then
Dim strArgArray
strArgArray = Split(Me.OpenArgs, "|")
Select Case strArgArray(0)
Case "newSPfromWI"
DoCmd.GoToRecord , , acNewRec
Dim rs As Recordset
Set rs = cdb.OpenRecordset("SELECT * FROM [Customers Table]
WHERE CustomerID = " & strArgArray(1))
With Me
!CustomerID = rs("customerid")
!LastName = rs("lastname")
!FirstName = rs("firstname")
!Customeraddress = rs("mailingaddress")
!Customercity = rs("city")
!Customerstate = rs("state")
!Customerzip = rs("zip")
!PhoneNumber = rs("phonenumber")
![Parcel#] = strArgArray(2)
!Township = strArgArray(3)
!Town = strArgArray(4)
!Range = strArgArray(5)
!Qtr = strArgArray(6)
!Qtr2 = strArgArray(7)
!CountyAddress = strArgArray(8)
!Roadway = strArgArray(9)
!Bedrooms = strArgArray(10)
!DateIssued = strArgArray(11)
!PriorPermitDate = strArgArray(12)
End With
Set rs = Nothing
Case Else
End Select
End If
End Sub
I have tried several codes with no success. Any ideas?