I am creating a web page for my father. I am using DWMX2004 with the ASP with VBScript.
I have 2 drop down menus. As it is right now the user must select something from each menu. I would like to add an "Any" option in the event that the user does not know one of the 2 options they are searching for.
I have a menu item called Any, but I do not know what to use for its value.
My search statement is as follows:
SELECT Catagory, Description, Varietal, Wine, Winery
Where Catagory = 'MMColParam' AND Varietal = 'mnuVarietal'
ORDER BY Wine ASC
MMColParam is one of the drop down menus and the mnuVarietal is the other.
What value should I give the Any option in my drop down list to make it pull from any of the entries in the field?
What I normally do is to run my own queries and build the list of choices... then put that list of choices into the box instead of relying on an SQL-query to populate it.
If that doesn't work so good in your case, how about putting a checkbox for "Any" or maybe a radio-button. Enable the drop-down list only when the "Any" choice isn't selected. Users can grok that pretty-much in a flash and it's not hard to implement. "Gets the job done just as well," and sometimes that's the name of the game.
okay, sorry, i guess the article was not clear enough
you have an IF/ELSE construction in the SQL that is actually supposed to be outside the sql, in your scripting language
i am not an access programmer so i do not know how to do that in access -- if you have a form dropdown or whatever, you need to test it to see if the "any"/"all" option has been selected, and then generate the sql accordingly