Hi Everyone,
I'm writing a point-of-sales system in visual basic 6. On the main form, i have a command button (cmdnew). When the code executes, i get a runtime error '3001' on one line, which is in red. i tried swapping lines, but i cant find the problem. Thanks in advance.
Cruzer
Code:Private Sub cmdnew_Click() no clear Dim rs As New ADODB.Recordset Dim rs2 As New ADODB.Recordset rs.Open "tbltrans", con, adOpenDynamic, adLockPessimistic rs.AddNew rs!Receipt = txtreceipt.text rs.Update lbltotal.Caption = 0 txtbarcode.SetFocus txtpaid.text = "" txtchange.text = "" cmdadd.Enabled = True cmdnew.Enabled = False cmddelete.Enabled = True cmdedit.Enabled = True cmdcompute.Enabled = True End Sub




Reply With Quote