parameter query for report with graph

M

Margie

Good morning,

I've created a report that summarizes the number of tests for each test
category selected over a particular date range; to illustrate:

Between [Begin Date] And [End Date]:
Number of Tests Category
26 FIRE
16 LAW
8 CLERICAL

I'd like to insert either a bar or pie chart to graphically illustrate this.
I've used the Chart Wizard, but when I run the report, the (same) parameter
query attached to the report and chart repeatedly asks for the begin and end
dates, then (if I don't cancel out first) only illustrates a single category.


Can someone help me? I'm a beginner, so you may need to go step-by-step. I
really appreciate all the other posts I've learned from at this site and
thank you for any help you can give - it is VERY appreciated ;-)

Margie
 
M

Margie

As an additional note, the begin and end dates are requested to be run on
each category - I'd like it to only ask once at the opening of the report.
Otherwise, it seems to be working.

Thanks - Margie
 
W

WebDude

Hi Margie,
I had a similar problem to the one you described. I did a search on this
newsgroups articles and came up with this post from Duane...


-----------------------------------
Don't use parameter prompts in queries. Use references to controls on
unbound forms. Martin Green has some great tutorials at
http://www.fontstuff.com/access/index.htm for this.

--
Duane Hookom
MS Access MVP
------------------------------------



.... i went to the link he provided and long story short, it worked.
If you gots anys questions, feel free to ask.



webdude out!
 
W

WebDude

Its me again,

this will also help!! curteousy of fredg (c) 2005




----------------------------------------------------------------------
Use a Form to enter the parameters.

Create an unbound form.
Add 2 unbound text controls.
Set their format to a valid date format.
Name them "StartDate" and "EndDate"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

In the Report's Record Source [CompanyID] field criteria line write:
forms!ParamForm!FindCompany

As criteria in the query date field write:
Between forms!Paramform!StartDate and forms!ParamForm!EndDate

Use the same criteria in the Graph record source.

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the selection of the Company and the
entry of the starting and ending dates wanted.
Click the command button and then report will run.
The graph will use the same criteria.
When the report closes, it will close the form.
 
M

Margie

Thanks for your help! This seems to do the trick ;-) - Margie

WebDude said:
Hi Margie,
I had a similar problem to the one you described. I did a search on this
newsgroups articles and came up with this post from Duane...


-----------------------------------
Don't use parameter prompts in queries. Use references to controls on
unbound forms. Martin Green has some great tutorials at
http://www.fontstuff.com/access/index.htm for this.

--
Duane Hookom
MS Access MVP
------------------------------------



... i went to the link he provided and long story short, it worked.
If you gots anys questions, feel free to ask.



webdude out!







Margie said:
Good morning,

I've created a report that summarizes the number of tests for each test
category selected over a particular date range; to illustrate:

Between [Begin Date] And [End Date]:
Number of Tests Category
26 FIRE
16 LAW
8 CLERICAL

I'd like to insert either a bar or pie chart to graphically illustrate this.
I've used the Chart Wizard, but when I run the report, the (same) parameter
query attached to the report and chart repeatedly asks for the begin and end
dates, then (if I don't cancel out first) only illustrates a single category.


Can someone help me? I'm a beginner, so you may need to go step-by-step. I
really appreciate all the other posts I've learned from at this site and
thank you for any help you can give - it is VERY appreciated ;-)

Margie
 
Top