Hi!
This is probably not the best place to post this question. Though here it goes:
i'm trying to write this app where there is a Textbox for barcode for dvd's. When selling dvd's, the user uses the barcode reader to enter barcodes into the textbox, which should hopefully trigger it's _Change() method. What it should do is search the entered barcode in a MS Access database, and if it finds the code update it's value as "<<SOLD>>". But the problem is i'm getting the "Object doesn't support this property or method" error on the recordset.update method:
Code:Private Sub TextBarcode_Change() DataSell.Recordset.MoveFirst Do While Not DataSell.Recordset.EOF If Not InStr(DataSell.Recordset.Fields("Serial"), TextBarcode) = 0 Then ' Search the "Serial" field, which contains the barcodes DataSell.Recordset.Edit DataSell.Recordset.Fields("Serial") = "<<SOLD>>" ' Edit the current barcode value to <<SOLD>> DataSell.Recordset.Update ' ERROR HERE: Object doesn't support this property or method TextBarcode.Text = DataSell.Recordset.Fields("Serial") ' Update the barcode textbox with the new value in "Serial" field End If DataSell.Recordset.MoveNext Loop End Sub
How to fix the code so that it can edit the current record?
Thanks for any help



LinkBack URL
About LinkBacks


