Strange query behavior

S

Stephanie

Hello. I can't figure out why if I build a chart using one type of query, the
report will work but if I build the chart using the query chart wizard there
is an issue.

I have a report with a query that has date and department
[forms]![frquick]![Combo82] paramaters.

One subquery/chart works fine:
SELECT qu_DeptIncidentsByYear_DATE.[IncidentLevel],
Sum(qu_DeptIncidentsByYear_DATE.[CountOfLevel]) AS SumOfCountOfLevel
FROM qu_DeptIncidentsByYear_DATE
GROUP BY qu_DeptIncidentsByYear_DATE.[IncidentLevel];


The second subquery/chart works if I have it as such:
SELECT qu_FinancialTrends_DATE_REGION.Region, Sum(Abs([Net])) AS Abs,
Count(qu_FinancialTrends_DATE_REGION.Level) AS CountOfLevel
FROM qu_FinancialTrends_DATE_REGION
WHERE (((qu_FinancialTrends_DATE_REGION.AuthorDept)=Forms!FrQuick!Combo82)
And ((qu_FinancialTrends_DATE_REGION.LoggedDate) Between
CVDate(forms!frquick!StartDate) And CVDate(forms!frquick!EndDate)))
GROUP BY qu_FinancialTrends_DATE_REGION.AuthorDept,
qu_FinancialTrends_DATE_REGION.Region;

However if I build this second query using the chart wizard (I really want a
left y-axis of $ and a right y-axis as # and can't get this to work....) then
I get a parameter issue.

This is the sql from its build:
TRANSFORM Sum(qu_DeptIncidentsByYear_DATE_REGION.[Abs]) AS SumOfAbs
SELECT qu_DeptIncidentsByYear_DATE_REGION.[Region]
FROM qu_DeptIncidentsByYear_DATE_REGION
GROUP BY qu_DeptIncidentsByYear_DATE_REGION.[Region]
PIVOT qu_DeptIncidentsByYear_DATE_REGION.[CountOfLevel];

When I run this pivot query, I get an error message that Access does not
recognize 'Forms!frQuick!Combo82' as a valide field name or epression

On all subqueries, I have the date and department parameters not shown as I
need summary data.

Pivot queries are new to me- am I doing something wrong both in terms ofwhy
the parameter won't work and why I can't get a second y-axis?

Thanks,
Stephanie
 

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

Union query - sort of 4
Query with count, but what am I counting?! 4
Query summing on one line 4
Query math 1
Parameter date format 7
Remove zero totals in query 4
Duplicate values in Crosstab 3
Date Query 13

Top