Dropdown box in a query?

D

DianeandChipps

I have a report which is run on a query. When the report is requested a
popup box asks for the business name and another asks for the date in
question.
I have changed my criteria to combine a wildcard search but I would like the
first popup box to have a dropdown list of all the business names, is this
possible? This dropdown list would need to allow for new businesses to be
added to the database. Am I asking the impossible? The information is taken
from the Business Name field in the Client Details table. Many thanks for
any time spent on this.
 
J

Jeff Boyce

Add a combo box to a form. Base the combo box on your list of businesses by
using a query. Each time the query runs to fill the combo box list, it
should find all businesses, including the new ones.

Base your report on a query (as you do now). Modify the query to use the
value in the form's combo box as a parameter.

You haven't clearly explained whether the "popup box" that asks for
parameters is due to a parameterized query, or if you already have a form
that pops up to collect the parameters. If you need a list to chose from,
use the latter approach.
 
D

DianeandChipps

Thanks Jeff,
The popup box is a statement on the criteria of the query, [Enter the
Business Name], is that a problem?
Many thanks
 
J

Jeff Boyce

If I understand your use of terms, you have a parameterized query that "pops
up" a request for input when it runs. I am proposing that you create an
Access form and collect the information there, and modify the query so it
refers to the form. This would replace the current (if that is the case)
use of a parameter/popup in the query.

--
Good luck

Jeff Boyce
<Access MVP>

DianeandChipps said:
Thanks Jeff,
The popup box is a statement on the criteria of the query, [Enter the
Business Name], is that a problem?
Many thanks

Jeff Boyce said:
Add a combo box to a form. Base the combo box on your list of businesses by
using a query. Each time the query runs to fill the combo box list, it
should find all businesses, including the new ones.

Base your report on a query (as you do now). Modify the query to use the
value in the form's combo box as a parameter.

You haven't clearly explained whether the "popup box" that asks for
parameters is due to a parameterized query, or if you already have a form
that pops up to collect the parameters. If you need a list to chose from,
use the latter approach.

--
Good luck

Jeff Boyce
<Access MVP>

like
the is
taken
 
D

DianeandChipps

Thanks again Jeff, I have it sorted now.

Jeff Boyce said:
If I understand your use of terms, you have a parameterized query that "pops
up" a request for input when it runs. I am proposing that you create an
Access form and collect the information there, and modify the query so it
refers to the form. This would replace the current (if that is the case)
use of a parameter/popup in the query.

--
Good luck

Jeff Boyce
<Access MVP>

DianeandChipps said:
Thanks Jeff,
The popup box is a statement on the criteria of the query, [Enter the
Business Name], is that a problem?
Many thanks

Jeff Boyce said:
Add a combo box to a form. Base the combo box on your list of businesses by
using a query. Each time the query runs to fill the combo box list, it
should find all businesses, including the new ones.

Base your report on a query (as you do now). Modify the query to use the
value in the form's combo box as a parameter.

You haven't clearly explained whether the "popup box" that asks for
parameters is due to a parameterized query, or if you already have a form
that pops up to collect the parameters. If you need a list to chose from,
use the latter approach.

--
Good luck

Jeff Boyce
<Access MVP>

I have a report which is run on a query. When the report is requested a
popup box asks for the business name and another asks for the date in
question.
I have changed my criteria to combine a wildcard search but I would like
the
first popup box to have a dropdown list of all the business names, is this
possible? This dropdown list would need to allow for new businesses to be
added to the database. Am I asking the impossible? The information is
taken
from the Business Name field in the Client Details table. Many thanks for
any time spent on this.
 

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