Hi guys
I have developed a system that my client is using now. There is some problem coming up in storing the scanned barcodes in the database. Actually i have written the following code in the lost focus event of textbox:
The user scans the barcodes in text17 very quickly so in that case some barcodes does not come up in the table and sometimes the barcodes get stored in incorrect order. I think speed is the issue. Is there any option I can put in to speed up vba code processing.
Regards
Aman
I have developed a system that my client is using now. There is some problem coming up in storing the scanned barcodes in the database. Actually i have written the following code in the lost focus event of textbox:
Code:
Private Sub Text17_LostFocus()
sSQL = "INSERT INTO inputtable ([date],location,department,Barcode,Signature) VALUES (#" & Format(Me.Text4.Value, "mm-dd-yy") & "#, '" & Me.Combo12.Value & "','" & Me.Combo15.Value & "', '" & Me.Text17.Value & "','No')"
DoCmd.SetWarnings False
DoCmd.RunSQL sSQL
sSQL = "Delete from inputtable where Barcode=' '"
DoCmd.RunSQL sSQL
end sub
The user scans the barcodes in text17 very quickly so in that case some barcodes does not come up in the table and sometimes the barcodes get stored in incorrect order. I think speed is the issue. Is there any option I can put in to speed up vba code processing.
Regards
Aman