hey
i have a search in my database thats search by name
how do i search it by phone number or date using options buttons?
this is the code for the search name only
tnx for the help
i have a search in my database thats search by name
how do i search it by phone number or date using options buttons?
this is the code for the search name only
Code:
Set RS = CN.Execute("SELECT * from Inventory WHERE InvItem LIKE '%" & RplS(TxtFind.text) & "%' ORDER BY InvID")
LsVw.ListItems.clear
While Not RS.EOF
Set Itm = LsVw.ListItems.Add(, , RS!InvDate, , "date")
Itm.Tag = RS!InvID
Itm.SubItems(1) = RS!InvItem
Itm.SubItems(2) = RS!invQuantity
Itm.SubItems(3) = RS!InvBeforetax
Itm.SubItems(4) = RS!InvInvoice
Itm.SubItems(5) = RS!InvSupplier
Itm.SubItems(6) = RS!InvEmail
Itm.SubItems(7) = RS!InvPhone
Itm.SubItems(8) = RS!InvBranch
Itm.SubItems(9) = RS!InvFax
Itm.SubItems(10) = RS!InvCompany
Itm.SubItems(11) = RS!InvPaymentMethod
Itm.SubItems(12) = RS!InvPayments
Itm.SubItems(13) = RS!InvParts
Itm.SubItems(14) = RS!InvExpire
Itm.SubItems(15) = Format(RS!invTax / 100, ".##%")
Itm.SubItems(16) = RS!InvAftertax
Itm.SubItems(17) = RS!InvForCust
Itm.SubItems(18) = RS!InvRemarks
RS.MoveNext
TxtFind.SetFocus
Wend
End Sub