=> Combo Box wiht ALL option preceeding Row Source SELECT

  • Thread starter Thread starter Rhonda Fischer
  • Start date Start date
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
 
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


.
 
Back
Top