i have a table that holds currency prices
shampo 50 $
hairdryer 70 $
i also have a combobox that i want to filter by numbers
ex. select between 20-40 if i have products that there price are 20,30,40 then i will see it
or 50-90 then i will see the products that have a price of 50,60,70,80,90
tnx for the help
salsa31
shampo 50 $
hairdryer 70 $
i also have a combobox that i want to filter by numbers
ex. select between 20-40 if i have products that there price are 20,30,40 then i will see it
or 50-90 then i will see the products that have a price of 50,60,70,80,90
Code:
Private Sub CmbPrice_Click()
If CmbPrice.ListIndex = 0 Then Exit Sub
Set rs = CN.Execute("SELECT * from PriceList WHERE PriceCost LIKE '%" & RplS(CmbPrice.text) & "%' ORDER BY PriceCost")
LsVw.ListItems.clear
While Not rs.EOF
Set itm = FrmPriceList.LsVw.ListItems.Add(, , rs!PriceName, , "price")
itm.Tag = rs!PriceID
itm.SubItems(1) = FormatCurrency(rs!PriceCost)
itm.SubItems(2) = rs!PriceRemarks
rs.MoveNext
rs.MoveNext
Wend
End Sub
Code:
Private Sub Form_Activate()
CmbPrice.AddItem "30-50"
CmbPrice.AddItem "50-100"
End Sub
salsa31