Graph in Report

  • Follow


Hello-

I am trying to include a graph in an Access report.  The graph report is 
based off of a query.  I built an unbound form named "ParamFormDept" with 
three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
dept criteria into that they want the report for.  When I run the query on 
its own, the data comes up correctly.  When I run the report with the graph 
in it I get an error message saying "...does not recognize the name 
[forms]![ParamFormDept]![cboDate] as a valid field name or expression."  

My graphs row source says:
PARAMETERS forms!ParamFormDept!StartDate 
DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
[Date Of Complaint] Between forms!ParamFormDept!StartDate and 
forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
[Main Category Description]

I'm thinking my error must be related to something in the row source....my 
question is what should the graph row source be?

Help is appreciated....thanks!



0
Reply Utf 2/13/2008 7:52:00 PM

Your query parameters provide the data types of the date control values but 
not the cboDept. I would expect to see this in
PARAMETERS forms!ParamFormDept!StartDate 
DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
-- 
Duane Hookom
Microsoft Access MVP


"Amber" wrote:

> Hello-
> 
> I am trying to include a graph in an Access report.  The graph report is 
> based off of a query.  I built an unbound form named "ParamFormDept" with 
> three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> dept criteria into that they want the report for.  When I run the query on 
> its own, the data comes up correctly.  When I run the report with the graph 
> in it I get an error message saying "...does not recognize the name 
> [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> 
> My graphs row source says:
> PARAMETERS forms!ParamFormDept!StartDate 
> DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> [Main Category Description]
> 
> I'm thinking my error must be related to something in the row source....my 
> question is what should the graph row source be?
> 
> Help is appreciated....thanks!
> 
> 
> 
0
Reply Utf 2/13/2008 8:42:01 PM


I added this in the row source, and the graph is blank.  If I leave the 
cboDept blank, then it graphs for the correct time frame. But if I specify 
the cboDept, the graph is blank.  Below is what I added in the graph's row:

PARAMETERS forms!ParamFormDept!StartDate 
DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
Text;

Otherwise, the rest of the row source remained the same.  Is there something 
else I need to add to have the graph capture the dept also?

Thanks!


"Duane Hookom" wrote:

> Your query parameters provide the data types of the date control values but 
> not the cboDept. I would expect to see this in
> PARAMETERS forms!ParamFormDept!StartDate 
> DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> -- 
> Duane Hookom
> Microsoft Access MVP
> 
> 
> "Amber" wrote:
> 
> > Hello-
> > 
> > I am trying to include a graph in an Access report.  The graph report is 
> > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > dept criteria into that they want the report for.  When I run the query on 
> > its own, the data comes up correctly.  When I run the report with the graph 
> > in it I get an error message saying "...does not recognize the name 
> > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > 
> > My graphs row source says:
> > PARAMETERS forms!ParamFormDept!StartDate 
> > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > [Main Category Description]
> > 
> > I'm thinking my error must be related to something in the row source....my 
> > question is what should the graph row source be?
> > 
> > Help is appreciated....thanks!
> > 
> > 
> > 
0
Reply Utf 2/14/2008 3:25:03 PM

What is the full sql view of your Row Source?
Can we assume your form is open a values entered?
Do you have the Link Master/Child properties set to any values?

-- 
Duane Hookom
Microsoft Access MVP


"Amber" wrote:

> I added this in the row source, and the graph is blank.  If I leave the 
> cboDept blank, then it graphs for the correct time frame. But if I specify 
> the cboDept, the graph is blank.  Below is what I added in the graph's row:
> 
> PARAMETERS forms!ParamFormDept!StartDate 
> DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> Text;
> 
> Otherwise, the rest of the row source remained the same.  Is there something 
> else I need to add to have the graph capture the dept also?
> 
> Thanks!
> 
> 
> "Duane Hookom" wrote:
> 
> > Your query parameters provide the data types of the date control values but 
> > not the cboDept. I would expect to see this in
> > PARAMETERS forms!ParamFormDept!StartDate 
> > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > -- 
> > Duane Hookom
> > Microsoft Access MVP
> > 
> > 
> > "Amber" wrote:
> > 
> > > Hello-
> > > 
> > > I am trying to include a graph in an Access report.  The graph report is 
> > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > dept criteria into that they want the report for.  When I run the query on 
> > > its own, the data comes up correctly.  When I run the report with the graph 
> > > in it I get an error message saying "...does not recognize the name 
> > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > 
> > > My graphs row source says:
> > > PARAMETERS forms!ParamFormDept!StartDate 
> > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > [Main Category Description]
> > > 
> > > I'm thinking my error must be related to something in the row source....my 
> > > question is what should the graph row source be?
> > > 
> > > Help is appreciated....thanks!
> > > 
> > > 
> > > 
0
Reply Utf 2/14/2008 3:43:03 PM

The row source of my graph is:

PARAMETERS forms!ParamFormDept!StartDate 
DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
Complaint],"MMM 'YY") PIVOT [Main Category Description]

I do not have the Link Master/Child properties field set.  I'm thinking it 
has to be something with my row source...however, just not sure of what I'm 
missing....possibly something with the "WHERE" piece of the statment?



"Duane Hookom" wrote:

> What is the full sql view of your Row Source?
> Can we assume your form is open a values entered?
> Do you have the Link Master/Child properties set to any values?
> 
> -- 
> Duane Hookom
> Microsoft Access MVP
> 
> 
> "Amber" wrote:
> 
> > I added this in the row source, and the graph is blank.  If I leave the 
> > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > 
> > PARAMETERS forms!ParamFormDept!StartDate 
> > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > Text;
> > 
> > Otherwise, the rest of the row source remained the same.  Is there something 
> > else I need to add to have the graph capture the dept also?
> > 
> > Thanks!
> > 
> > 
> > "Duane Hookom" wrote:
> > 
> > > Your query parameters provide the data types of the date control values but 
> > > not the cboDept. I would expect to see this in
> > > PARAMETERS forms!ParamFormDept!StartDate 
> > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > -- 
> > > Duane Hookom
> > > Microsoft Access MVP
> > > 
> > > 
> > > "Amber" wrote:
> > > 
> > > > Hello-
> > > > 
> > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > dept criteria into that they want the report for.  When I run the query on 
> > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > in it I get an error message saying "...does not recognize the name 
> > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > 
> > > > My graphs row source says:
> > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > [Main Category Description]
> > > > 
> > > > I'm thinking my error must be related to something in the row source....my 
> > > > question is what should the graph row source be?
> > > > 
> > > > Help is appreciated....thanks!
> > > > 
> > > > 
> > > > 
0
Reply Utf 2/14/2008 7:58:01 PM

I don't see where you are referencing the cboDept in your query row source 
where clause. What is your issue with the graph?

-- 
Duane Hookom
Microsoft Access MVP


"Amber" wrote:

> The row source of my graph is:
> 
> PARAMETERS forms!ParamFormDept!StartDate 
> DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
> 'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
> forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
> Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
> Complaint],"MMM 'YY") PIVOT [Main Category Description]
> 
> I do not have the Link Master/Child properties field set.  I'm thinking it 
> has to be something with my row source...however, just not sure of what I'm 
> missing....possibly something with the "WHERE" piece of the statment?
> 
> 
> 
> "Duane Hookom" wrote:
> 
> > What is the full sql view of your Row Source?
> > Can we assume your form is open a values entered?
> > Do you have the Link Master/Child properties set to any values?
> > 
> > -- 
> > Duane Hookom
> > Microsoft Access MVP
> > 
> > 
> > "Amber" wrote:
> > 
> > > I added this in the row source, and the graph is blank.  If I leave the 
> > > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > > 
> > > PARAMETERS forms!ParamFormDept!StartDate 
> > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > Text;
> > > 
> > > Otherwise, the rest of the row source remained the same.  Is there something 
> > > else I need to add to have the graph capture the dept also?
> > > 
> > > Thanks!
> > > 
> > > 
> > > "Duane Hookom" wrote:
> > > 
> > > > Your query parameters provide the data types of the date control values but 
> > > > not the cboDept. I would expect to see this in
> > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > > -- 
> > > > Duane Hookom
> > > > Microsoft Access MVP
> > > > 
> > > > 
> > > > "Amber" wrote:
> > > > 
> > > > > Hello-
> > > > > 
> > > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > > dept criteria into that they want the report for.  When I run the query on 
> > > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > > in it I get an error message saying "...does not recognize the name 
> > > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > > 
> > > > > My graphs row source says:
> > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > > [Main Category Description]
> > > > > 
> > > > > I'm thinking my error must be related to something in the row source....my 
> > > > > question is what should the graph row source be?
> > > > > 
> > > > > Help is appreciated....thanks!
> > > > > 
> > > > > 
> > > > > 
0
Reply Utf 2/15/2008 2:39:00 AM

I don't know how to write this code:  The only place I added the cboDept was 
in the PARAMETERS part of the clause.  For the WHERE clause I tried adding 
[Description] like forms!ParamFormDept!cboDept but I get a Sytnex error 
message.  My issue with the graph is that its blank when I specify a dept.  
Its not recognizing when I specify a dept.  What should I add for the WHERE 
clause?  


"Duane Hookom" wrote:

> I don't see where you are referencing the cboDept in your query row source 
> where clause. What is your issue with the graph?
> 
> -- 
> Duane Hookom
> Microsoft Access MVP
> 
> 
> "Amber" wrote:
> 
> > The row source of my graph is:
> > 
> > PARAMETERS forms!ParamFormDept!StartDate 
> > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
> > 'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
> > forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
> > Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
> > Complaint],"MMM 'YY") PIVOT [Main Category Description]
> > 
> > I do not have the Link Master/Child properties field set.  I'm thinking it 
> > has to be something with my row source...however, just not sure of what I'm 
> > missing....possibly something with the "WHERE" piece of the statment?
> > 
> > 
> > 
> > "Duane Hookom" wrote:
> > 
> > > What is the full sql view of your Row Source?
> > > Can we assume your form is open a values entered?
> > > Do you have the Link Master/Child properties set to any values?
> > > 
> > > -- 
> > > Duane Hookom
> > > Microsoft Access MVP
> > > 
> > > 
> > > "Amber" wrote:
> > > 
> > > > I added this in the row source, and the graph is blank.  If I leave the 
> > > > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > > > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > > > 
> > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > Text;
> > > > 
> > > > Otherwise, the rest of the row source remained the same.  Is there something 
> > > > else I need to add to have the graph capture the dept also?
> > > > 
> > > > Thanks!
> > > > 
> > > > 
> > > > "Duane Hookom" wrote:
> > > > 
> > > > > Your query parameters provide the data types of the date control values but 
> > > > > not the cboDept. I would expect to see this in
> > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > > > -- 
> > > > > Duane Hookom
> > > > > Microsoft Access MVP
> > > > > 
> > > > > 
> > > > > "Amber" wrote:
> > > > > 
> > > > > > Hello-
> > > > > > 
> > > > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > > > dept criteria into that they want the report for.  When I run the query on 
> > > > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > > > in it I get an error message saying "...does not recognize the name 
> > > > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > > > 
> > > > > > My graphs row source says:
> > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > > > [Main Category Description]
> > > > > > 
> > > > > > I'm thinking my error must be related to something in the row source....my 
> > > > > > question is what should the graph row source be?
> > > > > > 
> > > > > > Help is appreciated....thanks!
> > > > > > 
> > > > > > 
> > > > > > 
0
Reply Utf 2/15/2008 2:46:05 PM

Skip the graph for the moment and try create a query with the SQL you 
provided. Make sure you add something like " [DeptField] = 
Forms!ParamFormDept!cboDept".

Do you see any records returned from the crosstab query?

-- 
Duane Hookom
Microsoft Access MVP


"Amber" wrote:

> I don't know how to write this code:  The only place I added the cboDept was 
> in the PARAMETERS part of the clause.  For the WHERE clause I tried adding 
> [Description] like forms!ParamFormDept!cboDept but I get a Sytnex error 
> message.  My issue with the graph is that its blank when I specify a dept.  
> Its not recognizing when I specify a dept.  What should I add for the WHERE 
> clause?  
> 
> 
> "Duane Hookom" wrote:
> 
> > I don't see where you are referencing the cboDept in your query row source 
> > where clause. What is your issue with the graph?
> > 
> > -- 
> > Duane Hookom
> > Microsoft Access MVP
> > 
> > 
> > "Amber" wrote:
> > 
> > > The row source of my graph is:
> > > 
> > > PARAMETERS forms!ParamFormDept!StartDate 
> > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
> > > 'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
> > > forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
> > > Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
> > > Complaint],"MMM 'YY") PIVOT [Main Category Description]
> > > 
> > > I do not have the Link Master/Child properties field set.  I'm thinking it 
> > > has to be something with my row source...however, just not sure of what I'm 
> > > missing....possibly something with the "WHERE" piece of the statment?
> > > 
> > > 
> > > 
> > > "Duane Hookom" wrote:
> > > 
> > > > What is the full sql view of your Row Source?
> > > > Can we assume your form is open a values entered?
> > > > Do you have the Link Master/Child properties set to any values?
> > > > 
> > > > -- 
> > > > Duane Hookom
> > > > Microsoft Access MVP
> > > > 
> > > > 
> > > > "Amber" wrote:
> > > > 
> > > > > I added this in the row source, and the graph is blank.  If I leave the 
> > > > > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > > > > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > > > > 
> > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > > Text;
> > > > > 
> > > > > Otherwise, the rest of the row source remained the same.  Is there something 
> > > > > else I need to add to have the graph capture the dept also?
> > > > > 
> > > > > Thanks!
> > > > > 
> > > > > 
> > > > > "Duane Hookom" wrote:
> > > > > 
> > > > > > Your query parameters provide the data types of the date control values but 
> > > > > > not the cboDept. I would expect to see this in
> > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > > > > -- 
> > > > > > Duane Hookom
> > > > > > Microsoft Access MVP
> > > > > > 
> > > > > > 
> > > > > > "Amber" wrote:
> > > > > > 
> > > > > > > Hello-
> > > > > > > 
> > > > > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > > > > dept criteria into that they want the report for.  When I run the query on 
> > > > > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > > > > in it I get an error message saying "...does not recognize the name 
> > > > > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > > > > 
> > > > > > > My graphs row source says:
> > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > > > > [Main Category Description]
> > > > > > > 
> > > > > > > I'm thinking my error must be related to something in the row source....my 
> > > > > > > question is what should the graph row source be?
> > > > > > > 
> > > > > > > Help is appreciated....thanks!
> > > > > > > 
> > > > > > > 
> > > > > > > 
0
Reply Utf 2/15/2008 8:50:03 PM

Yes- the query returned the correct records, for only the dept specified. Its 
seems to be only when I try and add the graph in, then the data doesn't show 
up. I have a regular report by dept, and that is fine too, only when I add 
the graph does the data not show up.

"Duane Hookom" wrote:

> Skip the graph for the moment and try create a query with the SQL you 
> provided. Make sure you add something like " [DeptField] = 
> Forms!ParamFormDept!cboDept".
> 
> Do you see any records returned from the crosstab query?
> 
> -- 
> Duane Hookom
> Microsoft Access MVP
> 
> 
> "Amber" wrote:
> 
> > I don't know how to write this code:  The only place I added the cboDept was 
> > in the PARAMETERS part of the clause.  For the WHERE clause I tried adding 
> > [Description] like forms!ParamFormDept!cboDept but I get a Sytnex error 
> > message.  My issue with the graph is that its blank when I specify a dept.  
> > Its not recognizing when I specify a dept.  What should I add for the WHERE 
> > clause?  
> > 
> > 
> > "Duane Hookom" wrote:
> > 
> > > I don't see where you are referencing the cboDept in your query row source 
> > > where clause. What is your issue with the graph?
> > > 
> > > -- 
> > > Duane Hookom
> > > Microsoft Access MVP
> > > 
> > > 
> > > "Amber" wrote:
> > > 
> > > > The row source of my graph is:
> > > > 
> > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
> > > > 'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
> > > > forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
> > > > Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
> > > > Complaint],"MMM 'YY") PIVOT [Main Category Description]
> > > > 
> > > > I do not have the Link Master/Child properties field set.  I'm thinking it 
> > > > has to be something with my row source...however, just not sure of what I'm 
> > > > missing....possibly something with the "WHERE" piece of the statment?
> > > > 
> > > > 
> > > > 
> > > > "Duane Hookom" wrote:
> > > > 
> > > > > What is the full sql view of your Row Source?
> > > > > Can we assume your form is open a values entered?
> > > > > Do you have the Link Master/Child properties set to any values?
> > > > > 
> > > > > -- 
> > > > > Duane Hookom
> > > > > Microsoft Access MVP
> > > > > 
> > > > > 
> > > > > "Amber" wrote:
> > > > > 
> > > > > > I added this in the row source, and the graph is blank.  If I leave the 
> > > > > > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > > > > > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > > > > > 
> > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > > > Text;
> > > > > > 
> > > > > > Otherwise, the rest of the row source remained the same.  Is there something 
> > > > > > else I need to add to have the graph capture the dept also?
> > > > > > 
> > > > > > Thanks!
> > > > > > 
> > > > > > 
> > > > > > "Duane Hookom" wrote:
> > > > > > 
> > > > > > > Your query parameters provide the data types of the date control values but 
> > > > > > > not the cboDept. I would expect to see this in
> > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > > > > > -- 
> > > > > > > Duane Hookom
> > > > > > > Microsoft Access MVP
> > > > > > > 
> > > > > > > 
> > > > > > > "Amber" wrote:
> > > > > > > 
> > > > > > > > Hello-
> > > > > > > > 
> > > > > > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > > > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > > > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > > > > > dept criteria into that they want the report for.  When I run the query on 
> > > > > > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > > > > > in it I get an error message saying "...does not recognize the name 
> > > > > > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > > > > > 
> > > > > > > > My graphs row source says:
> > > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > > > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > > > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > > > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > > > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > > > > > [Main Category Description]
> > > > > > > > 
> > > > > > > > I'm thinking my error must be related to something in the row source....my 
> > > > > > > > question is what should the graph row source be?
> > > > > > > > 
> > > > > > > > Help is appreciated....thanks!
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
0
Reply Utf 2/18/2008 4:59:03 PM

In the reports On Open & On Close events, its coded as:
Private Sub Report_Close()
DoCmd.Close acForm, "ParamFormDept"
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "ParamFormDept", , , , , acDialog
End Sub

Should these be coded differently?  I ask because, when I delete the events, 
the graph works just fine.  But I want to use the form, because its easier 
for data entry on the user.  Just thought this might be an option.  I don't 
know what the event code should be?

Thanks.


"Amber" wrote:

> Yes- the query returned the correct records, for only the dept specified. Its 
> seems to be only when I try and add the graph in, then the data doesn't show 
> up. I have a regular report by dept, and that is fine too, only when I add 
> the graph does the data not show up.
> 
> "Duane Hookom" wrote:
> 
> > Skip the graph for the moment and try create a query with the SQL you 
> > provided. Make sure you add something like " [DeptField] = 
> > Forms!ParamFormDept!cboDept".
> > 
> > Do you see any records returned from the crosstab query?
> > 
> > -- 
> > Duane Hookom
> > Microsoft Access MVP
> > 
> > 
> > "Amber" wrote:
> > 
> > > I don't know how to write this code:  The only place I added the cboDept was 
> > > in the PARAMETERS part of the clause.  For the WHERE clause I tried adding 
> > > [Description] like forms!ParamFormDept!cboDept but I get a Sytnex error 
> > > message.  My issue with the graph is that its blank when I specify a dept.  
> > > Its not recognizing when I specify a dept.  What should I add for the WHERE 
> > > clause?  
> > > 
> > > 
> > > "Duane Hookom" wrote:
> > > 
> > > > I don't see where you are referencing the cboDept in your query row source 
> > > > where clause. What is your issue with the graph?
> > > > 
> > > > -- 
> > > > Duane Hookom
> > > > Microsoft Access MVP
> > > > 
> > > > 
> > > > "Amber" wrote:
> > > > 
> > > > > The row source of my graph is:
> > > > > 
> > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > > Text; TRANSFORM Count(*) AS [Count] SELECT Format([Date of Complaint],"MMM 
> > > > > 'YY") FROM [qryGraphbyDept] WHERE [Date Of Complaint] Between 
> > > > > forms!ParamFormDept!StartDate and forms!ParamFormDept!EndDate GROUP BY 
> > > > > Year([Date of Complaint])*12 + Month([Date of Complaint])-1,Format([Date of 
> > > > > Complaint],"MMM 'YY") PIVOT [Main Category Description]
> > > > > 
> > > > > I do not have the Link Master/Child properties field set.  I'm thinking it 
> > > > > has to be something with my row source...however, just not sure of what I'm 
> > > > > missing....possibly something with the "WHERE" piece of the statment?
> > > > > 
> > > > > 
> > > > > 
> > > > > "Duane Hookom" wrote:
> > > > > 
> > > > > > What is the full sql view of your Row Source?
> > > > > > Can we assume your form is open a values entered?
> > > > > > Do you have the Link Master/Child properties set to any values?
> > > > > > 
> > > > > > -- 
> > > > > > Duane Hookom
> > > > > > Microsoft Access MVP
> > > > > > 
> > > > > > 
> > > > > > "Amber" wrote:
> > > > > > 
> > > > > > > I added this in the row source, and the graph is blank.  If I leave the 
> > > > > > > cboDept blank, then it graphs for the correct time frame. But if I specify 
> > > > > > > the cboDept, the graph is blank.  Below is what I added in the graph's row:
> > > > > > > 
> > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime,forms!ParamFormDept!cboDept 
> > > > > > > Text;
> > > > > > > 
> > > > > > > Otherwise, the rest of the row source remained the same.  Is there something 
> > > > > > > else I need to add to have the graph capture the dept also?
> > > > > > > 
> > > > > > > Thanks!
> > > > > > > 
> > > > > > > 
> > > > > > > "Duane Hookom" wrote:
> > > > > > > 
> > > > > > > > Your query parameters provide the data types of the date control values but 
> > > > > > > > not the cboDept. I would expect to see this in
> > > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime, ... right here ...;
> > > > > > > > -- 
> > > > > > > > Duane Hookom
> > > > > > > > Microsoft Access MVP
> > > > > > > > 
> > > > > > > > 
> > > > > > > > "Amber" wrote:
> > > > > > > > 
> > > > > > > > > Hello-
> > > > > > > > > 
> > > > > > > > > I am trying to include a graph in an Access report.  The graph report is 
> > > > > > > > > based off of a query.  I built an unbound form named "ParamFormDept" with 
> > > > > > > > > three text boxes, StartDate/EndDate/cboDept that the user enters the date and 
> > > > > > > > > dept criteria into that they want the report for.  When I run the query on 
> > > > > > > > > its own, the data comes up correctly.  When I run the report with the graph 
> > > > > > > > > in it I get an error message saying "...does not recognize the name 
> > > > > > > > > [forms]![ParamFormDept]![cboDate] as a valid field name or expression."  
> > > > > > > > > 
> > > > > > > > > My graphs row source says:
> > > > > > > > > PARAMETERS forms!ParamFormDept!StartDate 
> > > > > > > > > DateTime,forms!ParamFormDept!EndDate DateTime; TRANSFORM Count(*) AS [Count] 
> > > > > > > > > SELECT Format([Date of Complaint],"MMM 'YY") FROM [qryGraphbyDept] WHERE 
> > > > > > > > > [Date Of Complaint] Between forms!ParamFormDept!StartDate and 
> > > > > > > > > forms!ParamFormDept!EndDate GROUP BY Year([Date of Complaint])*12 + 
> > > > > > > > > Month([Date of Complaint])-1,Format([Date of Complaint],"MMM 'YY") PIVOT 
> > > > > > > > > [Main Category Description]
> > > > > > > > > 
> > > > > > > > > I'm thinking my error must be related to something in the row source....my 
> > > > > > > > > question is what should the graph row source be?
> > > > > > > > > 
> > > > > > > > > Help is appreciated....thanks!
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
0
Reply Utf 2/18/2008 9:17:02 PM

9 Replies
294 Views

(page loaded in 0.22 seconds)


Reply: