Wildcard in a combo box as default

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form with a number of combo boxes that runs a SELECT
DISTINCT query against a table field which is then used as the choices to
limit the record selection in the table. Let's say the choices are apples,
oranges, bananas if you choose apples the report list only apples. I want the
default choose to be an asterisk for this combo box and several others that
are part of this form. Therefore by default you get all the records when you
click the "run report" button on this form. But if you change combo box 1 to
apples your get records that include apples in the fruit field. If you change
the other combo box to vendor "abc" you get only apples from vender "abc" but
of course if you leave the asterisk in all three combo boxes you get all the
records in the table.
 
SELECT "*" as Item_ID, "All" as Item_Name
FROM tbl_Items
UNION
SELECT Item_ID , Item_Name
FROM tbl_Items
 
Back
Top