Graph Report

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
 
D

Duane Hookom

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.
 
D

DawnP277

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
 
D

Duane Hookom

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top