N
Nick Mleczko
Hi,
I'm trying to delete a record programatically, this is the code;
Dim db As DAO.Database
'Dim QD As QueryDef
'Dim where As Variant
Dim strSQL As String
Set db = CurrentDb()
Set db = CurrentDb
strSQL = "DELETE * FROM tblQuoteDescription where QuoteID =" &
intQuote & " and CustomerID =" & Forms!frmMain.CustomerID & ";"
db.Execute strSQL
db.Execute strSQL, dbFailOnError
Debug.Print db.RecordsAffected
Debug.Print strSQL
The records exists but the rowsaffected is returned as 0
the SQL statement is as follows;
DELETE * FROM tblQuoteDescription where QuoteID = 40100 and CustomerID
= 9;
ANy help would be greatly appreciated
N
I'm trying to delete a record programatically, this is the code;
Dim db As DAO.Database
'Dim QD As QueryDef
'Dim where As Variant
Dim strSQL As String
Set db = CurrentDb()
Set db = CurrentDb
strSQL = "DELETE * FROM tblQuoteDescription where QuoteID =" &
intQuote & " and CustomerID =" & Forms!frmMain.CustomerID & ";"
db.Execute strSQL
db.Execute strSQL, dbFailOnError
Debug.Print db.RecordsAffected
Debug.Print strSQL
The records exists but the rowsaffected is returned as 0
the SQL statement is as follows;
DELETE * FROM tblQuoteDescription where QuoteID = 40100 and CustomerID
= 9;
ANy help would be greatly appreciated
N