A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Parameter Value Box



 
 
Thread Tools Display Modes
  #1  
Old March 7th, 2006, 04:47 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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????

  #2  
Old March 7th, 2006, 04:51 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

assign the query as the record source for your report on the report's
property sheet.

Brian

"taf" wrote in message
ups.com...
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????



  #3  
Old March 7th, 2006, 04:52 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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

"taf" wrote in message
ups.com...
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????



  #4  
Old March 7th, 2006, 04:55 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

Thanks, Brian--Could you show me how to do that --I'm not exactly sure
I know what you mean. Thanks SO much!!

  #5  
Old March 7th, 2006, 05:01 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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]));

  #6  
Old March 7th, 2006, 05:03 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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


"taf" wrote in message
oups.com...
Thanks, Brian--Could you show me how to do that --I'm not exactly sure
I know what you mean. Thanks SO much!!



  #7  
Old March 7th, 2006, 05:10 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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


"Brian Bastl" wrote in message
...
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


"taf" wrote in message
oups.com...
Thanks, Brian--Could you show me how to do that --I'm not exactly sure
I know what you mean. Thanks SO much!!





  #8  
Old March 7th, 2006, 05:35 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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 [Table].[Filed Name]=[Forms]![Form Name]![Combo Box Name] OR
[Table].[Filed Name]=[Forms]![Form Name]![Combo Box Name]

Is that the correct formatting?

  #9  
Old March 7th, 2006, 05:55 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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

"taf" wrote in message
oups.com...
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]));



  #10  
Old March 7th, 2006, 06:00 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Parameter Value Box

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" wrote in message
oups.com...
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 [Table].[Filed Name]=[Forms]![Form Name]![Combo Box Name] OR
[Table].[Filed Name]=[Forms]![Form Name]![Combo Box Name]

Is that the correct formatting?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Query Advise Dermot General Discussion 3 February 4th, 2006 08:23 PM
Return all records in FORM fed parameter query Jim G. Running & Setting Up Queries 1 October 2nd, 2005 06:17 AM
Parameter not Working; Returning all Values DEI General Discussion 1 March 25th, 2005 07:25 PM
Select Query Parameter Repeating Neutron1871 Running & Setting Up Queries 1 October 8th, 2004 08:07 AM
How do I print the details view David Running & Setting Up Queries 5 August 28th, 2004 12:17 AM


All times are GMT +1. The time now is 11:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.