Hello there,
i've a set of code to search through table containing column values like $2000 - $3000, $5000 - $6000 and so on.
If i were to enter something like $2000 - $5500, both results would be displayed.
unfortunately, the set of code works only when the values are without the $ sign.
Similarly, i have other values for [Age Group] which has values like 30 - 50 and etc. (without the $ sign) and... it works perfectly.
How can i alter the codes to accomodate the $ sign?
VB Code:
sMHouse = Me.TextMHouse sMH = Split(sMHouse, " ") sMHouse = " and ( " Do While sMH(0) <= sMH(1) sMHouse = sMHouse & " ( [Monthly Household] like '%" & sMH(0) & "%' ) or " sMH(0) = sMH(0) + 1 Loop sMHouse = Mid(sMHouse, 1, Len(sMHouse) - 5) sMHouse = sMHouse & " or [Monthly Household] not like '%" & sMH(0) & "%' or [Monthly Household] not like '%" & sMH(1) + 1 & "%') and [Monthly Household] is not null ) "
Thank You
Astro




Reply With Quote