Graph Report

  • Thread starter Thread starter DawnP277
  • Start date Start date
D

DawnP277

I am having a problem getting a graph to prompt for the parameters in the
query.

I wrote a query and put created the graph and everything is great. However
I am going to want to change the date range as time goes on.

It appears that the graph that I wrote from a wizard is not looking at my
query.

When I duplicate my graph with a paramter query when I change it to report
view it looks exactly like the design view my data is not coming across.

Does anyone have any suggestions.

Thank you Dawn
 
First, I don't think parameter prompts are ever good user interface. You
should use criteria from controls on forms.

You didn't share the Row Source of your graph. This is the one property that
effects the records displaying your graph.
 
Duane, I agree, in the past I have used controls for the paramters.

My row source reads the following, (I used the graph wizard)
TRANSFORM Sum([CountOfSerialNum]) AS [SumOfCountOfSerialNum] SELECT
(Format([CDate],"WW 'YY")) FROM [Failed summary] GROUP BY
(Year([CDate])*CLng(54) + DatePart("ww",[CDate],0)-1),(Format([CDate],"WW
'YY")) PIVOT [Reason];

The query's SQL is as follows(name of query is Failed summary)
SELECT FinisherTable.CDate, FinisherTable.Crate, FinisherTable.Reason,
Count(FinisherTable.SerialNum) AS CountOfSerialNum
FROM FinisherTable
GROUP BY FinisherTable.CDate, FinisherTable.Crate, FinisherTable.Reason
HAVING (((FinisherTable.CDate) Between [forms]![Form1]![Text0] And
[forms]![Form1]![Text2]) AND ((FinisherTable.Crate)="FAILED"));


Do you know why it will not update from the query?

Thanks
Dawn
 
The row source is a crosstab so you must use Query->Parameters to add the
parameters and their data types:
[forms]![Form1]![Text0] DateTime
[forms]![Form1]![Text2] DateTime

BTW: name your controls "Text0"? Kick it up a notch...
--
Duane Hookom
Microsoft Access MVP


DawnP277 said:
Duane, I agree, in the past I have used controls for the paramters.

My row source reads the following, (I used the graph wizard)
TRANSFORM Sum([CountOfSerialNum]) AS [SumOfCountOfSerialNum] SELECT
(Format([CDate],"WW 'YY")) FROM [Failed summary] GROUP BY
(Year([CDate])*CLng(54) + DatePart("ww",[CDate],0)-1),(Format([CDate],"WW
'YY")) PIVOT [Reason];

The query's SQL is as follows(name of query is Failed summary)
SELECT FinisherTable.CDate, FinisherTable.Crate, FinisherTable.Reason,
Count(FinisherTable.SerialNum) AS CountOfSerialNum
FROM FinisherTable
GROUP BY FinisherTable.CDate, FinisherTable.Crate, FinisherTable.Reason
HAVING (((FinisherTable.CDate) Between [forms]![Form1]![Text0] And
[forms]![Form1]![Text2]) AND ((FinisherTable.Crate)="FAILED"));


Do you know why it will not update from the query?

Thanks
Dawn

Duane Hookom said:
First, I don't think parameter prompts are ever good user interface. You
should use criteria from controls on forms.

You didn't share the Row Source of your graph. This is the one property that
effects the records displaying your graph.
 
Back
Top