|
I have a small project using only one form with textboxes and list view. i used textboxes to reflect my records from SQL database I have ADD, EDIT, DELETE, and UPDATE buttons my codes are working except displaying in the listview the exact output. Here are some fields in my PAYMENT table. strReceiptNo, DatePaid, strLastName, strFirstName, strMidName, strPayFor, curAmount. I wnat to display the strPayFor and curAmount in the listview depending on the strReceipt in the txtReceiptNo.text (a textbox control in my form). There are more than 1 strPayFor and curAmount in 1 strReceiptNo. in my code all are displayed.
here is my code...
Public Sub disReceipt() If (txtReceiptNo.Text) = myOtherPay.rsOthers.Fields(0).Value Then ListView1.ListItems.Add , , txtReceiptNo.Text ListView1.ListItems(ListView1.ListItems.count).SubItems(1) = Trim(txtReceiptNo.Text) ListView1.ListItems(ListView1.ListItems.count).SubItems(1) = Trim(cboDesc.Text) ListView1.ListItems(ListView1.ListItems.count).SubItems(2) = Val(txtAmtPaid) End If End Sub
Thanks.
This post has been edited by penzzap: 21 Apr, 2008 - 09:53 PM
|