Sir magandang araw po itatanung ko lang po sana ito po ang code ko sa search paano ko po kaya masesearch ang ID nd customer at Date ng sabay,,,
kasi po may parehas po kasing customer ID ngunit magkaiba ang date nila,,,,ang gusto ko po sanang mangyari ay ma filter ko yung ID at date ng sabay;;
Halimbawa po:
ID date
1 2/9/2017
1 2/10/2017
2 2/10/2017
2 2/9/2017
ang tinype ko po sa txtID ay 1 malabas po yung lahat ng may ID na 1 tapos
Pag nagtype na po me sa txtdate ng 2/9/2017 dapat po ang malabas po sa sa listview ay
ID date
1 2/9/2017
possible po kaya eto,,,paano po kya ,,,,salamat po,,,,vb6.0 po eto
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Set Connect = New Class1
Set rx = New ADODB.Recordset
With rx
rx.Open "Select * from xinstallmentsummary where ID like '" & txtID & "'", con, 3, 3
If rx.RecordCount >= 1 Then
ListView1.ListItems.Clear
Do While Not .EOF
ListView1.ListItems.Add , , !ID, 1, 1
ListView1.ListItems(ListView1.ListItems.Count).SubItems(1) = "" & !SalesInvoice
ListView1.ListItems(ListView1.ListItems.Count).SubItems(2) = "" & !CustomerID
ListView1.ListItems(ListView1.ListItems.Count).SubItems(3) = "" & !Customername
ListView1.ListItems(ListView1.ListItems.Count).SubItems(4) = "" & !Customerlastname
ListView1.ListItems(ListView1.ListItems.Count).SubItems(5) = "" & !Totalamount
ListView1.ListItems(ListView1.ListItems.Count).SubItems(6) = "" & !Tendered
ListView1.ListItems(ListView1.ListItems.Count).SubItems(7) = "" & !Balance
ListView1.ListItems(ListView1.ListItems.Count).SubItems(8) = "" & !Duedate
rx.MoveNext
Loop
.Close
Else
End If
End With
Set rx = Nothing
con.Close: Set con = Nothing
kasi po may parehas po kasing customer ID ngunit magkaiba ang date nila,,,,ang gusto ko po sanang mangyari ay ma filter ko yung ID at date ng sabay;;
Halimbawa po:
ID date
1 2/9/2017
1 2/10/2017
2 2/10/2017
2 2/9/2017
ang tinype ko po sa txtID ay 1 malabas po yung lahat ng may ID na 1 tapos
Pag nagtype na po me sa txtdate ng 2/9/2017 dapat po ang malabas po sa sa listview ay
ID date
1 2/9/2017
possible po kaya eto,,,paano po kya ,,,,salamat po,,,,vb6.0 po eto
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Set Connect = New Class1
Set rx = New ADODB.Recordset
With rx
rx.Open "Select * from xinstallmentsummary where ID like '" & txtID & "'", con, 3, 3
If rx.RecordCount >= 1 Then
ListView1.ListItems.Clear
Do While Not .EOF
ListView1.ListItems.Add , , !ID, 1, 1
ListView1.ListItems(ListView1.ListItems.Count).SubItems(1) = "" & !SalesInvoice
ListView1.ListItems(ListView1.ListItems.Count).SubItems(2) = "" & !CustomerID
ListView1.ListItems(ListView1.ListItems.Count).SubItems(3) = "" & !Customername
ListView1.ListItems(ListView1.ListItems.Count).SubItems(4) = "" & !Customerlastname
ListView1.ListItems(ListView1.ListItems.Count).SubItems(5) = "" & !Totalamount
ListView1.ListItems(ListView1.ListItems.Count).SubItems(6) = "" & !Tendered
ListView1.ListItems(ListView1.ListItems.Count).SubItems(7) = "" & !Balance
ListView1.ListItems(ListView1.ListItems.Count).SubItems(8) = "" & !Duedate
rx.MoveNext
Loop
.Close
Else
End If
End With
Set rx = Nothing
con.Close: Set con = Nothing