Add "ALL" to Combo Box

G

Guest

I have a combo box that has a rowsource associated with a query/view. I'd
like to add the option for "All" at the top of the combo box. I see this all
the time, so there must be a way to do it.

The results I want are:

<ALL>
Option 1
Option 2, etc.

the name of my rowsource is tblOrderStatus and I'm listing out OrderStatusID
and OrderStatus.

Thank You.
 
F

fredg

I have a combo box that has a rowsource associated with a query/view. I'd
like to add the option for "All" at the top of the combo box. I see this all
the time, so there must be a way to do it.

The results I want are:

<ALL>
Option 1
Option 2, etc.

the name of my rowsource is tblOrderStatus and I'm listing out OrderStatusID
and OrderStatus.

Thank You.


Change the table and field names to your actual table and field names.

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.

Quwstion... Do you wish to include the OrderStatusID field?
As Combo box Rowsource:

Select tblOrderStatus.OrderStatusID,OrderStatus From tblOrderStatus
Union Select Null, "<ALL>" from tblOrderStatus Order by OrderStatus;

The above shows the OrderStatusID as well as the OrderStatus fields,
leaving a blank in the OrderStatusID field where <All> is shown.

<All>
15 OptionA
3 OptionB
20 etc...


Do you wish to show just the OrderStatus column?

Select tblOrderStatus.OrderStatus From tblOrderStatus Union Select
"<ALL>" from tblOrderStatus Order by OrderStatus;

<All>
OptionA
OptionB
etc...
 

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