Union to Display all but no results

A

Andrea

I have taken the posted advice and created a union query
to use as a control source for my combo box. All is
displayed in the list but it produces no results any
advice?
 
D

Douglas J. Steele

How exactly are you using it? It's not enough to simply add the word All to
a combo box if, say, you're trying to use it as a parameter for a query.
 
A

Andrea

I created a union query this is the statement:

SELECT CircKey, Category FROM tbl_HDCircKey UNION Select
Null as AllChoice, "All" as Bogus FROM tbl_HDCircKey;

I attached that query to a combo box that shows a list of
categories, but when I select All I get no results.
 
D

Douglas J. Steele

So what's the SQL of your query look like?

Assuming your combobox is bound to the first column, and it's a numeric
field, it should be something like WHERE MyField = Forms!MyForm!MyComboBox
OR Forms!MyForm!MyComboBox IS NULL

(replace MyField, MyForm and MyComboBox with the correct names...)
 
V

Van T. Dinh

From your previous thread, can to post the code of the CommandButton you
click to view the results.
 

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