=> Combo Box wiht ALL option preceeding Row Source SELECT

R

Rhonda Fischer

Hello,

I have a combo box with a row source of:

SELECT DISTINCT [Depot] FROM tblStaff ORDER BY [Depot];

The form with this combo box on it is a Search form that
takes the user-determined criteria, of depot and
date range, to create a report.

However I would also like the option to select ALL and
wondered if there was a way to have an 'ALL' appear
in the combo box before the full list of Depots as per
the row source. So that I could create a report with ALL
depots and not just the selected depot in the drop
down combo box.

Any suggestions would be terrific.

Thank you kindly
Rhonda
 
R

Rhonda Fischer

Hello Ron,

Thank you very much for your reply, yes that did
work, cool :)

Thanks heaps
Rhonda



-----Original Message-----
Try

Select Distinct Depot From tblStaff
Union
Select '[All]'as Depot from tblStaff
Order By Depot;

The Brackets around All will likely force it to be the first item in the
list. You will need to use some special code that traps for [All] and sets
the search criteria to return (presumably) all of the records.

Ron W


"Rhonda Fischer" <Rhonda.Fischer@Turners-
Distribution.com> wrote in message
Hello,

I have a combo box with a row source of:

SELECT DISTINCT [Depot] FROM tblStaff ORDER BY [Depot];

The form with this combo box on it is a Search form that
takes the user-determined criteria, of depot and
date range, to create a report.

However I would also like the option to select ALL and
wondered if there was a way to have an 'ALL' appear
in the combo box before the full list of Depots as per
the row source. So that I could create a report with ALL
depots and not just the selected depot in the drop
down combo box.

Any suggestions would be terrific.

Thank you kindly
Rhonda


.
 

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