Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need help for my vb program (Method or Data Member not found)

This coding gives me error [ Compile Error : Method or Data Member not found ]
It runs on some machines correctly and on some it gives error at run time. Why ?

Private Sub cmdSearch_Click()

Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = OpenDatabase("D:ill printingBill.mdb")
Set rs = db.OpenRecordset("Bill", dbOpenDynaset)
While Not rs.EOF
If rs("name") = txtSearch.Text Then

Set lst = lst.ListItems.Add(, , Format(Sl, "00"))
'lst.SubItems(1) = ""
'lst.SubItems(2) = ""
'lst.SubItems(3) = ""
'lst.SubItems(4) = ""
lst.GridLines = True

lst.SubItems(1) = rs("Particular")
lst.SubItems(2) = rs("qty")
lst.SubItems(3) = rs("rate")
lst.SubItems(4) = rs("amount")
txtNtotal.Text = Format(Val(txtNtotal.Text) + Val(txtTOTAL), "0.00")
End If
Sign In or Register to comment.