Combo box and Select all

G

Guest

Hi all
I have a combo box on a form which allows me to filter by the selected value
in the dropdown list. The current SQL string is "SELECT
tbl_WhereSeen.WhereSeen FROM tbl_WhereSeen ORDER BY tbl_WhereSeen.WhereSeen; "

How do I include in the dropdown list an item that selects all items.

TIA

johnb
 
F

fredg

Hi all
I have a combo box on a form which allows me to filter by the selected value
in the dropdown list. The current SQL string is "SELECT
tbl_WhereSeen.WhereSeen FROM tbl_WhereSeen ORDER BY tbl_WhereSeen.WhereSeen; "

How do I include in the dropdown list an item that selects all items.

TIA

johnb


Note that the symbols <> surround the word "All". That is to have the
list sort with the word <All> at the top of the list before any other
"A" listing.

First add "<All>" to the drop down list.
As Combo box Rowsource:

"SELECT tbl_WhereSeen.WhereSeen FROM tbl_WhereSeen
Union Select "<ALL>" from tbl_WhereSeen
ORDER BY tbl_WhereSeen.WhereSeen; "

Then if you are using the Whereseen to filter data on,
change the query criteria to:

Like
IIf([forms]![FormName]![ComboName]="<ALL>","*",[forms]![FormName]![ComboName])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top