S
Sabineke
Hi,
Have a DB with linked tables to a SQL server.
Get following error when I try to delete some records in a table from within
VBA.
The records must match a value in a form "projectnr"
Run-Time Error 3622 : You must use the DBSeechanges option with
OpenRecordset when accessins a SQL server Table that has an IDENTITY column.
Here's my code :
Dim strSQL As String
strSQL = "DELETE TblEF.IDFE, TblEF.IDPFE, TblEF.Titel, TblEF.Finan,
TblEF.POrg " & _
" FROM TblEF" & _
" WHERE TblEF.IDPFE = " & [Forms]![FrmProjecten]![ProjectNr]
DBEngine(0)(0).Execute strSQL, dbFailOnError
Before I made the link to the SQL server tables this code worked in Access
(Tables in same DB)
Can Anyone help me. I'm just a starter on working this way.
Thanks in advance
Sabine
Have a DB with linked tables to a SQL server.
Get following error when I try to delete some records in a table from within
VBA.
The records must match a value in a form "projectnr"
Run-Time Error 3622 : You must use the DBSeechanges option with
OpenRecordset when accessins a SQL server Table that has an IDENTITY column.
Here's my code :
Dim strSQL As String
strSQL = "DELETE TblEF.IDFE, TblEF.IDPFE, TblEF.Titel, TblEF.Finan,
TblEF.POrg " & _
" FROM TblEF" & _
" WHERE TblEF.IDPFE = " & [Forms]![FrmProjecten]![ProjectNr]
DBEngine(0)(0).Execute strSQL, dbFailOnError
Before I made the link to the SQL server tables this code worked in Access
(Tables in same DB)
Can Anyone help me. I'm just a starter on working this way.
Thanks in advance
Sabine