Link to home
Start Free TrialLog in
Avatar of jad0083
jad0083

asked on

How to add item to a combobox Rowsource (table/query) that is not part of the query statement.

Good Afternoon,

I have a simple ComboBox that queries the items from a table.  Is it possible to programatically add items to that combobox that is not on any field in the table.  The logic behind this is that I'm using the queried items from the table as a means to filter another query.  I'm hoping to add "all" as part of the rowsource on the combobox.

Attached is the simple query:
substr = "SELECT DISTINCT Sub from Questions WHERE Questions.LOB = '" & strind & "' ORDER BY 1 ASC;"

Open in new window

Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

yes you can use a union query to do that

see this link for example

http://support.microsoft.com/?kbid=210290
Try:

Select Distinct Sub from questions etc.
UNION All
Select top 1 'All' From questions;
ASKER CERTIFIED SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jad0083
jad0083

ASKER

Thanks for the quick solution, exactly what I needed, thanks!
Thanks, glad to help.