Results 1 to 5 of 5
  1. #1
    Kirsti is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172

    Change Series Name in Legend in Chart Report using VBA

    Hi there,

    I asked this question in the report forum, but wasn't able to solve my issue.

    I know that it must be possible to change the series name in a chart using VBA, but am not at all experienced with writing it myself.

    Is anyone able to help with some code to enable me to do this?

    Any help much apreciated,

    Kirsti

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    No, don't think can do with code. The series name comes from the chart's RowSource data. If you want something else will have create an alias field with an expression in query and use that field in the chart RowSource.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Kirsti is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    Thanks June,

    Even if I do what you suggest though I'm not going to be able to get rid of the annoying "SumOf", "AvgOf" in the chart though right? So the only thing to do is calculate everything in the query?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You can use whatever name you want in place of the 'SumOf', 'AvgOf' in the query design. You aren't already doing calcs in the query? What type of chart and how is the data summarized? Sounds like you doing something I am not familiar with. If you want to provide project for analysis, I will look at.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Kirsti is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    172
    Thanks June. I usually do my calcs in the query, but sometimes I have a number that I want to total and average in the chart, and it would be easier to do it within the report if there was some way to change the series name. But as there doesn't appear to be any quick fix, I've done it in the query.

    Thanks again for your help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 07-29-2012, 04:38 PM
  2. Adding a chart to a report
    By Bigmix in forum Reports
    Replies: 7
    Last Post: 02-14-2012, 08:47 AM
  3. generate a chart report
    By smahdih in forum Reports
    Replies: 4
    Last Post: 11-28-2011, 02:39 PM
  4. Chart legend appears as date
    By Vronsky in forum Programming
    Replies: 0
    Last Post: 06-09-2011, 05:20 AM
  5. Pie Chart Design for Report
    By maggioant in forum Reports
    Replies: 0
    Last Post: 10-13-2009, 03:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums