wordpress statistics
  • Today is Tuesday, May 22, 2012

4 Responses to “PIE CHART OBJECT AND VBA”

  1. Hoodie says:

    Thanks for all this information.

    I created the table and used “number” for each of the fields except the first which is a “text” and is the primary key. When I ran the first part of the program using then command line I got a msg box that was “False” and asking for an entry. Could not get past that.

    So I moved on to the second part, this area, and tried the pie chart. However, I am using 2003 and need to know what the error “Type Mismatch” is when the line:

    With grphChart
    .chartType = lngType
    …..

    runs? Can anyone help.

  2. a.p.r.pillai says:

    Download a sample database with all the running programs of charts from the following link:

    http://www.msaccesstips.com/downloads/2008/06/workingwith_chartobject.php

  3. Leah says:

    I downloaded the database above and it was helpful. I was a little disappointed that the example here (unlike the bar/column one)was so fancy with no queries, I would have preferred a dumbed down example like the bar/column one where I could follow the code (I am not a programmer). Anyway, I do not seem to be able to get my pie to work when I try to create one from scratch using the chart wizard. I only get a purple pie with a line to the center of it. Then I copied your report and pointed to my query and pasted and also pasted that into the a demo pie and it looked pretty good in that my pie divided into six with labels and values and different colors for each slice.

    The problem is that I need to use percentages. My values/percentages do not match the demo and report view of the data so though it looks ok it is completely wrong.

    My “crosstab” query for each column is:

    79.74% 14.16% 4.47% 1.46% 0.17% 0.00%

    My demo pie and report shows:

    70 22 7 1

    What am I doing wrong?

    Thanks

    Leah

  4. Leah says:

    I finally figured out what I was doing wrong. I seem to need an “extra” column with “column name” for my first column. My data was in a crosstab like form (one record with 6 different columns), but it was was not really a crosstab. Access apparently thought that my first column was the column name so it ignored it in the calculation and then all my percentages were off. The strange thing is that I pasted everything starting with the second column but when I closed and came back to it, everything moved.

Leave a Reply

You must be logged in to post a comment.