Combo Box - Supplied by query but need wild card too.

G

Guest

I have a combo box that has a data source of a select distinct query. I have
a button that when clicked opens a report based on the value selected in the
combo box (this is no problem). My question is, I would like to also have at
the top of the selection, an * to select all records. I have put in the
default of the combo box an *, but when I click on the command button to open
report, it is blank. When I select any other value from combo box and click
button, I get the report I am expecting. How can I get it to select all
records. The report and combo box are fed from the same table. I want to be
able to see a single client's report, or all of the clients on the report.
Thanks in advance
 
G

Guest

Thanks Karl,
That helped. One other issue related to this. Since I put the * in the
Default property of the combo box, it comes up then first time you come to
the combo box. Once you select something from the list, the * is no longer
available. Is there a way to keep it as part of the list after the first
selection?


KARL DEWEY said:
In your query criteria try this --
Like [Forms]![YourForm]![YourComboBox]

Kenny A. said:
I have a combo box that has a data source of a select distinct query. I have
a button that when clicked opens a report based on the value selected in the
combo box (this is no problem). My question is, I would like to also have at
the top of the selection, an * to select all records. I have put in the
default of the combo box an *, but when I click on the command button to open
report, it is blank. When I select any other value from combo box and click
button, I get the report I am expecting. How can I get it to select all
records. The report and combo box are fed from the same table. I want to be
able to see a single client's report, or all of the clients on the report.
Thanks in advance
 
G

Guest

You will need to add it to your record source. Just add a phony record with
an asterisk.

Kenny A. said:
Thanks Karl,
That helped. One other issue related to this. Since I put the * in the
Default property of the combo box, it comes up then first time you come to
the combo box. Once you select something from the list, the * is no longer
available. Is there a way to keep it as part of the list after the first
selection?


KARL DEWEY said:
In your query criteria try this --
Like [Forms]![YourForm]![YourComboBox]

Kenny A. said:
I have a combo box that has a data source of a select distinct query. I have
a button that when clicked opens a report based on the value selected in the
combo box (this is no problem). My question is, I would like to also have at
the top of the selection, an * to select all records. I have put in the
default of the combo box an *, but when I click on the command button to open
report, it is blank. When I select any other value from combo box and click
button, I get the report I am expecting. How can I get it to select all
records. The report and combo box are fed from the same table. I want to be
able to see a single client's report, or all of the clients on the report.
Thanks in advance
 
G

Guest

Karl,
Not the most orthodox way to get it to work, but it did do the job.
Thanks for your knowledgeable help.

KARL DEWEY said:
You will need to add it to your record source. Just add a phony record with
an asterisk.

Kenny A. said:
Thanks Karl,
That helped. One other issue related to this. Since I put the * in the
Default property of the combo box, it comes up then first time you come to
the combo box. Once you select something from the list, the * is no longer
available. Is there a way to keep it as part of the list after the first
selection?


KARL DEWEY said:
In your query criteria try this --
Like [Forms]![YourForm]![YourComboBox]

:

I have a combo box that has a data source of a select distinct query. I have
a button that when clicked opens a report based on the value selected in the
combo box (this is no problem). My question is, I would like to also have at
the top of the selection, an * to select all records. I have put in the
default of the combo box an *, but when I click on the command button to open
report, it is blank. When I select any other value from combo box and click
button, I get the report I am expecting. How can I get it to select all
records. The report and combo box are fed from the same table. I want to be
able to see a single client's report, or all of the clients on the report.
Thanks in advance
 

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