How to display all data in a range with non-numerical criteria

Sianboy

Registered User.
Local time
Today, 22:19
Joined
Mar 27, 2009
Messages
12
Hey all, I a student who is doing a project for IT course now and non-sql user, therefore the solutions suggested should be siimplified or minimal code writing. Here the question.

I got a form that shows all details of a car as long its price is within a range. For example, any car with values of $20,000 will be displayed within the price range of $10,000 and $30,000. There are two combox box with values in the form, first is starting range and second is the ending range. Now the problem is, for the second combo box, there is a value called "No Max" in it, which means it can go infinite. The problem is how to do a query that will run such non-numerical value and display all cars with prices within the range of starting price to no max.

A quick reply is appreciated thanks!
 
You can't really. What I might do is have two columns in your combo. The second one is visible and is what you see now. The first would be hidden, but be the bound column, and in the No Max row it would have 9999999 in it (some value higher than any in the table).
 
You can't really. What I might do is have two columns in your combo. The second one is visible and is what you see now. The first would be hidden, but be the bound column, and in the No Max row it would have 9999999 in it (some value higher than any in the table).

That interesting! In this case, how you link the "No Max" value to both the column within the same combo box? That might work and 99999999 will be more than sufficient for the range itself.
 
Not sure what you mean by linking the value. I assume you have a one column, value list combo now. I would change it to two columns. For other rows, the values in each column would be the same 20,000 and 20,000 for example.
 
Not sure what you mean by linking the value. I assume you have a one column, value list combo now. I would change it to two columns. For other rows, the values in each column would be the same 20,000 and 20,000 for example.

I see thanks for the clarification. Yeah what I intend to do as you said, is one combox box with two column, in which 1 is visible and the other is invisible. Is there a way to do such combox box, whereby the value of the invisible column will be sent to the query as criteria? And at the same time, 20,000 and 20,000 for both the columns.
 
That's why I mentioned the first column being the bound column. The bound column is the one that will be read by the query.
 
I see I get what you mean. Just wonder how to create two column within one combo box? And also as simplified as possible.
 

Users who are viewing this thread

Back
Top Bottom