If you create a form, and put the combo on the form, you can refer to it in
your query. For example, you could type this into the Criteria row in your
query:
[Forms].[Form1].[Combo65]
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"john mcmichael" <johnmc...@discussions.microsoft.com> wrote in message
news:E66771CC-8BF4-4AB4...@microsoft.com...
[Forms]![formName]![listORcomboBOXname]
If you need to generate a report, base the report on the query. The button
on your form would need to invoke the report rather than the query.
You can also have the form open automatically when the database is opened,
if people who don't know Access are going to need to run this query and you
don't want them messing around with your tables and queries.
Thanks again.
The form must be open before the query if you expect the query to read the
value from the combo on the form.
If you have the form opened, and a value chosen in the combo, and then open
the query and still get asked for the parameter, then the reference to the
query is not typed correctly, e.g. there might be a space somewhere.
If this is a crosstab query, you must declare the parameter in the query.
It's a good idea to do that anyway. Choose Parameters on the query menu,
enter the full name of the parameter, and indicate the data type.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"john mcmichael" <johnmc...@discussions.microsoft.com> wrote in message
news:FFBC78F9-6918-4607...@microsoft.com...
>I have folks here at the office telling me that they have been able to do
> this in previous versions of Access but htey can't remember how. Is this
> something that has been removed from the software?
>
> Thanks again.
>
> "Allen Browne" wrote:
>
>> It is not possible to get a drop-down list into the Parameter box offered
>> by
>> a query.
>>
>> If you create a form, and put the combo on the form, you can refer to it
>> in
>> your query. For example, you could type this into the Criteria row in
>> your
>> query:
>> [Forms].[Form1].[Combo65]
>>
The form has to be opened and the choice made *before* you open the query or
report that references it. Is that what you tried?
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
"Rick Brandt" wrote:
Hi Rick,
Yes that is what I did. I typed it in the criteria same way as suggested, I
had the form open and it still didn't work. I am unsure what I did, or what
I am doing wrong?
>
>
>
Please help!
Thank you,
--
Nick