S
Stewart
I'm trying to to delete a single record.
Using the following:
----code-------
SaleNo As Long
strID As String
SaleNo = 4
strID = 23
Dim db As Database, RS As Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
Set RS = db.OpenRecordset("tblTestdata")
RS.FindFirst "[SaleID] = ' SaleNo" And "[VendorID] = ' strID"
'RS.FindFirst"[SaleID] = 4 AND "[VendorID] = 23 'TM error also
'RS![BitID] = SaleNo
'RS![RecipientID] = strID
RS.Edit
RS.Delete
RS.Update
RS.Close
DoEvents
DoCmd.Requery "lstList41"
---end code----
But i'm getting a "Type mismatch" error.
The data does exist in the table, only 6 records.
Any suggestions appreciated
Using the following:
----code-------
SaleNo As Long
strID As String
SaleNo = 4
strID = 23
Dim db As Database, RS As Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
Set RS = db.OpenRecordset("tblTestdata")
RS.FindFirst "[SaleID] = ' SaleNo" And "[VendorID] = ' strID"
'RS.FindFirst"[SaleID] = 4 AND "[VendorID] = 23 'TM error also
'RS![BitID] = SaleNo
'RS![RecipientID] = strID
RS.Edit
RS.Delete
RS.Update
RS.Close
DoEvents
DoCmd.Requery "lstList41"
---end code----
But i'm getting a "Type mismatch" error.
The data does exist in the table, only 6 records.
Any suggestions appreciated