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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2007: Pie-chart within form: Problems 1

Status
Not open for further replies.

cian

Technical User
Oct 11, 2001
1,383
0
0
Lads,


I'm new to access and this is killing me. I want to put a pie-chart into a form but can't get it to work.

I can insert a chart but the pie-chart won't display even close to how it should or does in excel.

I have a simple table (item list):

Item1 Item2 Item3 Item4 Item5 Item6
value1 Value2 Value3 Value4 Value5 Value6

When I go through the wizard and select these fields to include in the chart it only lets me show 1 series on the chart. Here is the row source code:

SELECT [Item1],Sum([Item1]) AS [SumOfItem1] FROM [Item List] GROUP BY [Item1];

I've tried modifying the row source but haven't had any success. Any ideas?

Cian

 
Change the Row Source to select exactly the values you want in your chart. Then, I believe there is a chart property that you can choose between "By Row" or "By Column". Since your Row Source is not normalized, you may have to switch this. The other option would be to use a normalizing Union query to get your Row Source to look like:
[tt]
Item Value
======= ========
ItOne Value1
ItTwo Value2
...
[/tt]

Duane
Hook'D on Access
MS Access MVP
 
I tried selecting other items like this:

SELECT [Item1],[Item2],[Item3] AS [SumOfItem1] FROM [Item List] GROUP BY [Item1];

but it returns an error "you tried to execute a query that doesn't include the specified expression "Item1" as part of an aggregate function".

I'll google "normalizing Union" as i'm not familiar with that.

 
Code:
SELECT [Item1],[Item2],[Item3],[Item4],[Item5],[Item6] FROM [Item List];

in combination with "By Row" or "By Column" sorted it.

Thanks for your help!!

 
Hi, Can you please tell me where i will find the
"By Row" or "By Column" field in Access graph.

Ref.
Change the Row Source to select exactly the values you want in your chart. Then, I believe there is a chart property that you can choose between "By Row" or "By Column". Since your Row Source is not normalized, you may have to switch this. The other option would be to use a normalizing Union query to get your Row Source to look like:

Regards: Anthony.
 
I my version of Access/Charts (2003), I double click the chart while in design view. Select Data from the menu and you will see something like:
[tt][blue]
== Series in Rows
|| Series in Columns
[/blue][/tt]

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top