Adjust data table size and graph size independently in Access XP

Mach1pro
Mach1pro used Ask the Experts™
on
I have a graph report  in Access XP.  The graph area is about twice the height of the Data Table height. When there is more than 12 categories of data, then the additional categories do not appear in the Data Table but are truncated on the report. Is there any way to make the graph area shorter so that the Data Table can be taller and display all categories?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill RossProgrammer

Commented:
Please post a screen shot.  I'm having trouble understanding your issue.  BD
As a general comment, it's most often a bad idea to use the chat's internal data table, mainly because it can't grow. It's easier to display a subreport below the chart to show the data, based on a similar query. However, you should be able to reduce the size of the char area in design mode and save that, and it is possible to manipulate the chart through code, but that can be a bit tricky.

(°v°)

Author

Commented:
Okay, since it doesn't look like the parts of the chart are sizeable independently and I have to make a subreport to use as a table, How am I to either extract the color values represented by each data series on the chart so that I can create a reference color splotch on my subreport or how can I force the chart to make the data series specific colors?
You can use code to read the colours from the chart. Just like in Excel, the colours are managed through an index in a colour palette, but the actual RGB values are also available. However, your second idea is much better.

To examine the colours used in MS-Graph, open the chart in design view and choose (Tools | Options...). The [Color] tab shows the colour index, with the default choices for chart lines and chart fills at the bottom. To examine or change one, select it and press [Modify...]. The second tab of the picker shows RGB values, for example 153,153,255.

To convert a RGB triplet to a single long integer, open the immediate pane of VB (Ctrl+G) and type:

    ? RGB(153,153,255)
     16751001

If you have selected a different colour index for, say, the second series, the MS-Graph object will remember that. Basically, you have two methods to change the colour used: edit the palette (the preferred method in MS-Graph, but tricky in Excel, because there is only one palette per workbook), or pick a colour from the upper portion (the most often used method in Excel). In both cases, you can easily record the colour code.

The long version of the colour code can be typed directly in any colour property in Access. Access luckily doesn't use a palette, and interprets reliably all colour codes.

Does that help?
(°v°)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial