Parameter Value Box

  • Thread starter Thread starter taf
  • Start date Start date
T

taf

I am trying to create a drop-down list to pass a user-defined parameter
into a query which generates a report. I have created a form, with a
combo box that has all of the values contained. I have used the
following in my query [Forms]![MyForm]![MyCombo]. Where do I go from
here to get the report to run using that query when I click on an "OK"
button on the form????
 
assign the query as the record source for your report on the report's
property sheet.

Brian
 
If your report is bound to your query (which looks to the form for its
parameter), just open the report. See:

DoCmd.OpenReport ...

in Access HELP for syntax.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks, Brian--Could you show me how to do that --I'm not exactly sure
I know what you mean. Thanks SO much!!
 
OK -- got that, but now when I click OK - it still prompts me for a
Parameter. Here is the query that I am using:

SELECT [BPC Issues].[Issue Title], [BPC Issues].[Issue Description],
[BPC Issues].Rating, [BPC Issues].[Initiating Group], [BPC
Issues].[Initiation Date], [BPC Issues].[Audit Number], [BPC
Issues].Documentation, [Action Plan].[Action Plan Description], [Action
Plan].[Business Area], [Action Plan].[Business Area 2], [Action
Plan].[BPC Contact], [Action Plan].[BPC Contact 2], [Action
Plan].[Target Date], [Action Plan].Status, [Action Plan].Comments
FROM [BPC Issues] INNER JOIN [Action Plan] ON [BPC Issues].[Tracking
Number] = [Action Plan].[Tracking Number]
WHERE ((([Action Plan].[Business Area Responsible])=[Forms]![BPC
Business Area Filter]![Business Area])) OR ((([Action Plan].[Business
Area Responsible 2])=[Forms]![BPC Business Area Filter]![Business
Area]));
 
taf,

to get you up and running quickly, create a new report using the Wizard.
When it asks from which table or query, use the 'dropdown' to select your
query, and then click the '>>' button to move all of the available fields
into the report.

Then add a command button on your form to open the report.

HTH,
Brian
 
I see that you've got two threads going. If you're still getting a parameter
prompt, then I'd suggest double checking the name of your form's control in
the WHERE clause of your query.

But I'll step aside now. Stick with your dialogue with Jeff Boyce.

Brian
 
No, Brian, you've been very helpful. I'm new to these chats, so not
sure what the etiquette is on multiple threads, etc. In my query I
have it formatted the following way:

WHERE ((([Action Plan].[Business Area Responsible])=[Forms]![BPC
Business Area Filter]![Business Area])) OR ((([Action Plan].[Business
Area Responsible 2])=[Forms]![BPC Business Area Filter]![Business
Area]));

Meaning:

WHERE
.[Filed Name]=[Forms]![Form Name]![Combo Box Name] OR
.[Filed Name]=[Forms]![Form Name]![Combo Box Name]

Is that the correct formatting?
 
You'll get a parameter prompt if the query can't resolve the source you've
given it. This may be due to a spelling error.

You might also need to put the Parameters ([Forms]!...) into the Query |
Properties | list, with the correct data type.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi taf,

etiquette is not the issue, and I certainly took no offense. The issue is
that Jeff Boyce [MVP] is much more knowledgable and qualified than I am in
Access, and can therefore provide you with more comprehensive help. I
suppose I should have put a smile in the last post.

You said before that you had already had a query. Have you tried to run it?
Does it return the results your are expecting. Only you can answer this. As
far as I can tell from what you've just posted, your WHERE clause looks
syntactically fine.

HTH,
Brian
 
thanks for all of your help - i finally figured out that i hadn't
switched the name in the properties of the control box to the name on
the control i used. i was driving myself nuts!
 
Brian

(don't count on it... <!G!>)

Regards

Jeff Boyce
Microsoft Office/Access MVP

Brian Bastl said:
Hi taf,

etiquette is not the issue, and I certainly took no offense. The issue is
that Jeff Boyce [MVP] is much more knowledgable and qualified than I am in
Access, and can therefore provide you with more comprehensive help. I
suppose I should have put a smile in the last post.

You said before that you had already had a query. Have you tried to run
it?
Does it return the results your are expecting. Only you can answer this.
As
far as I can tell from what you've just posted, your WHERE clause looks
syntactically fine.

HTH,
Brian


taf said:
No, Brian, you've been very helpful. I'm new to these chats, so not
sure what the etiquette is on multiple threads, etc. In my query I
have it formatted the following way:

WHERE ((([Action Plan].[Business Area Responsible])=[Forms]![BPC
Business Area Filter]![Business Area])) OR ((([Action Plan].[Business
Area Responsible 2])=[Forms]![BPC Business Area Filter]![Business
Area]));

Meaning:

WHERE
.[Filed Name]=[Forms]![Form Name]![Combo Box Name] OR
.[Filed Name]=[Forms]![Form Name]![Combo Box Name]

Is that the correct formatting?
 
Back
Top