
Dutchie
|
| Posted: 03/23/2003, 4:20 PM |
|
I have 3 listboxes to filter shown information. The listboxes are on 1 page, the results are shown on the same page.
The first text in every listbox is "please make a choice".
When users do not make a choice but click immediately on the go-button, all information in the db is shown. And that is now what I would like to be possible.
How can I prevent that?
(newbie)
|
|
|
 |
Headhunter
|
| Posted: 03/23/2003, 11:33 PM |
|
Give the "please make a choice" value of the listbox a value that doesn't exist in the database table(s). Probaly the value is empty right now.
|
|
|
 |
Ken Hardwick
|
| Posted: 03/24/2003, 2:51 AM |
|
Dutchie,
In the "close" event of the listbox form, check to see if all three values
have been left blank (default value). If so, then set one of them to an invalid
value.
For example, using ASP,do something like..
If s_field1 = "" and s_field2 = "" and s_field3 = "" then
s_field1 = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
end if
Ken Hardwick
Norman,Oklahoma
|
|
|
 |
banjo
|
| Posted: 03/24/2003, 12:52 PM |
|
If you make the search default a value like "xxxxxxxxxxxxxxxxxxxxxxxx" then the db will go search anyway, find nothing and return nothing....but...it will have gone done a search, and on a big table that can take too much time.
Instead, make the search " where 1-2" and notice the difference in response time.
banjo
|
|
|
 |
Dutchie
|
| Posted: 03/26/2003, 2:25 AM |
|
I've experimented a lot with the input of you guys, but nothing works!
I do not understand that, in principle youre answers looked very promissing.
Help appreciated, have any clue?
|
|
|
 |
|

|