Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart in Report

Status
Not open for further replies.

Aximboy

Technical User
Aug 3, 2003
63
US
I have a chart in my Access report. In my report, I need to add two items to show it on a graph.

Example: (This is what I have on the RowSource on my chart.)
SELECT [Year Sampled],[PV],[BPN],SUM([Composition#]) AS [Mica/Chlorite] FROM [qryMinerals] WHERE [Minerals] IN ('Mica','Chlorite')

Access indicates that, "You tried to execute a query that does not include the specified expression "Year Sampled" as part of an aggregate function.

Here's what I want to happen, to show how [PV], [BPN], and the sum of Mica & Chlorite (in y axis) in different years (Year Sampled on x axis).

Thank you in advance.
 
Try set the row source to:
SELECT [Year Sampled],[PV],[BPN],SUM([Composition#]) AS [Mica/Chlorite]
FROM [qryMinerals]
WHERE [Minerals] IN ('Mica','Chlorite')
GROUP BY [Year Sampled],[PV],[BPN];

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thank you for your reply dhookom.

I tried your query, but it shows a dialog box asking to Enter Parameter Value for Minerals. There's an Ok & Cancel button, but nothing happens either button I clicked.

Now I'm even more confused.
 
You had [Minerals] in your first posting so I assumed you had a field named [Minerals] in [qryMinerals]. I think one issue was resolved and the next one has surfaced.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top