Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET DYNAMIC DROPDOWN LIST DEFAULT TO "ALL"?

Status
Not open for further replies.

vito0818

MIS
Jul 24, 2002
2
US
I have a 3 item form to query a database with. One item (GMCITY) is a text box, and two items are dynamic dropdown boxes (Meeting_Day, and GMDIST.) Both the drop down lists are populated dynamicly with values from the database. If I enter data in all three fields, the query works perfect. If I leave one or more fields empty (thus showing the default value of "all") I get a no results returned. I want it so my users do not have to enter all three fields if they don't want to. If they didn't enter anything, I want the query to return all values. I have tried both the * and % in various places, along with a trip to Barnes & Noble, not to mention hours of searching online. PLEASE HELP ME!
 
Explore this line of thinking. All three conditions must be met to get the record or records. A property of a database field is whether or not there's any information in there or not, or, is the field NULL or NOT NULL (<>NULL)? So, you could set up your query to match not only the inputted information, but also whether or not the records in question contain ANY info in those two other fields (<>NULL).

Confused? I think I may be, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top