Add an ALL choice to a combo box

G

Guest

Using Office 2003 and Windows XP;

I have a combo on a form with a SQL string in its RowSource. It works great,
but how can I change my SQL to include an "All" choice as the first item in
the drop down list?

For example, my SQL right now looks something like:

SELECT DISTINCT Dept1 FROM tblHeadCounts;

And yields: Accounting, Finance, Marketing, etc.

I want to include: ALL, Accounting, Finance, Marketing, etc.

Thanks in advance.
 
S

Stefan Hoffmann

hi,
I have a combo on a form with a SQL string in its RowSource. It works great,
but how can I change my SQL to include an "All" choice as the first item in
the drop down list?

For example, my SQL right now looks something like:

SELECT DISTINCT Dept1 FROM tblHeadCounts;

And yields: Accounting, Finance, Marketing, etc.

I want to include: ALL, Accounting, Finance, Marketing, etc.
Use a UNION query as row source:

SELECT "ALL" AS Dept1 FROM tblHeadCounts
UNION
SELECT DISTINCT Dept1 FROM tblHeadCounts



mfG
--> stefan <--
 

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