Adding an "All" Value to a Combo Box list from a query

  • Thread starter Thread starter John Baker
  • Start date Start date
J

John Baker

How would I be able to include a value of text such as "All Values" to
appear as a choice to be selected from a list of values in a combo box. The
combo box gets it's values from a query.

Any help greatly appreciated.
John Baker
 
John Baker said:
How would I be able to include a value of text such as "All Values" to
appear as a choice to be selected from a list of values in a combo box. The
combo box gets it's values from a query.

Any help greatly appreciated.
John Baker
See sample database Access: Northwind + Questions. I have seen this
somewhere. It was done with a Visual Basic function, I think.
 
You can do it with a UNION query. Something like this:

SELECT "(All Values)" As Value FROM [My Table]
UNION SELECT [My Table].[Value] FROM [My Table]
ORDER BY Value;

I usually put the "All..." string in parenthesis, which usually helps to
make sure it sorts to the top of the list.

Carl Rapson
 
Back
Top