Add more than one series to a pivot chart using VB MS Access continued...

I'm trying to programmatically create a stacked bar pivot chart.
Using "Programming Microsoft Office Access 2003" by Rick Dobson, I've
created the chart.  However, it doesn't distinguish between the
different values for the series.  Does anyone have any suggestions on
how to create a chart using one column containing three values for the
series?

Essentially, this is a continuation of a previous post:
http://groups.google.com/group/microsoft.public.access.formscoding/browse_thread/thread/e23f3506a6d561a0/674295d410a71cf9%23674295d410a71cf9"

Any help is greatly appreciated.

0
Cody
3/22/2007 9:22:29 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
2525 Views

Similar Articles

[PageSpeed] 53

On Mar 22, 4:22 pm, "Cody" <mrcod...@gmail.com> wrote:
> I'm trying to programmatically create a stacked bar pivot chart.
> Using "Programming Microsoft Office Access 2003" by Rick Dobson, I've
> created the chart.  However, it doesn't distinguish between the
> different values for theseries.  Does anyone have any suggestions on
> how to create a chart using one column containing three values for theseries?
>
> Essentially, this is a continuation of a previous post:http://groups.google.com/group/microsoft.public.access.formscoding/br..."
>
> Any help is greatly appreciated.

I figured it out.  For those that may be interested, the code (from
the link in the above post) sets data using chDimCategories and
chDimValues.  The different values were being pulled, but they weren't
shown.  By adding chDimSeriesNames for the chDimValues, I was able to
display the names of the different values from that column in the
chart's legend.  Also, I was able to set the desired colors for the
various series by using the seriescollection property.

Using the code from the above link, the below code is an example of
the changes made:
With frm1.ChartSpace
'Open PiovtChart without drop areas, and set its categories and
values
    .SetData chDimCategories, chDataBound, "[YearMonth]"
    .SetData chDimValues, chDataBound, "ExtPrice"
    .SetData chDimSeriesName, chDataBound, "ExtPrice"     <---- added
to show names of values
    .Charts(0).Type = chChartTypeLineMarkers   <---in my case, this
was a stacked bar chart
    .ChartspaceLegend = False  <---not exact, but something like this
to avoid having 2 legends (chartspace and chart)

'Assign and format titles to axes and overall chart
    With .Charts(0)
        .Axes(1).Title.Caption = "Sales ($)"
        .Axes(0).Title.Caption = "Dates"
        .HasTitle = True
        .Title.Caption = "Sales By Month"
        .Title.Font.Size = 14
        .HasLegend = True  <----  added to show legend
        .SeriesCollection("series 1 name").Interior.Color = vbRed
<--- this isn't exact..just something to give an idea
        .SeriesCollection("series 2 name").Interior.Color = vbYellow
<--- this isn't exact..just something to give an idea
    End With
End With

That's it.  Hopefully, this helps someone and saves time.

0
Cody
3/26/2007 1:14:25 AM
Reply:

Similar Artilces:

Using Relative path for XML data file?
Is there a way to specify a relative path to an XML data file imported into Excel 2003? I am writing a web app that generates report data as XML for the user to download to their local machine. This data is to be consumed by an Excel reporting spreadsheet, which contains display-formatted tables and charts that are mapped to various data fields in an XML Map, which is in turn linked to the xml data file they will download. The idea is the user only needs to download the data for updates, not the whole spreadsheet. However, since I cannot predict the path where the user will store their...

Formula without using numbers after decimal in the answer
I have a formula that derives the answer from a figure with a decimal. I don't want to use the figures after the decimal. Is there a way to just use the whole number and omit the numbers after the decimal without having to manually key in all these numbers manually? Thanks, Mustang You can use the INT function. This 'rounds down' any number to th nearest integer, e.g. if A1=2.567, a formula in B2 of =INT(A1) return 2 HTH Bruc -- swatsp0 ----------------------------------------------------------------------- swatsp0p's Profile: http://www.excelforum.com/member.php?...

Reporting from Project Server
I dont know if i need to ask this question here or in the Access section. I have an ODBC connection to the Project Server database so I can make reports through Access. Access' limit of 255 fields per table is causing me some trouble. for example, the MSP_VIEW_PROJ_PROJECTS_ENT table has well over 255 fields. Access only shows me the first 255 fields. how can I change that so I can see all the fields in that table? thanks, Hadi Hadi, I have not tried this yet it may be a viable option. Have your DBA create a view that pulls the key fields to this table and the specifi...

Pivot Table Question #5
How do I make the row headers show up in front of each row on pivot table instead of just once on the first row of a section? Thanks Try this: Copy the pivot table Do a Paste Special > Values into another sheet Ensure that the top left cell is A1 Run the Sub FillBlanks() below (from MVP Debra D) Sub FillBlanks() 'by Debra Dalgleish 7-Dec-2001 'fill blanks cells with data from above Range("A1").CurrentRegion _ .SpecialCells(xlCellTypeBlanks) _ .FormulaR1C1 = "=R[-1]C" Range("A1").CurrentRegion.Copy Range("A1").PasteS...

using the journal on outlook
Once I link an email to the journal, can I still find that email in my mail box? I seem to be able to get to it only via the journal. If this is the way it is supposed to be, how do I remove it from the journal and get it back into my mail box? Am I just missing something? -- thanks, Independent Are you linking to the item or putting a copy into the journal item? Also, has the item been archived or not? "Independent" <Independent@discussions.microsoft.com> wrote in message news:868279F2-53C8-403A-97F5-604CEECD873C@microsoft.com... > Once I link an email to the journ...

MS POS = RMS? Also, SQL Connectivity...
I'm new to MS Dynamics software, and I may be posting this in the wrong section - please let me know if I am. I have recently opened a retail store, and purchased MS Point of Sale to manage my POS functions. Is this software also called RMS? Is it a PART of RMS? From what I can find online, I cannot tell. Also, I'm interested in connecting to MS POS's MS SQL database with an external program (OSQL) to automate some SQL queries at the end of each day. Does anyone know what I use for the datebase name (master?), username (sa?), and password? I cannot seem to find any doc...

How to move MS Office without reinstalling?
I have an iMac that has had Microsoft Office on it since 2002 or so. Other family members have bought MS Office as well since then. They are all v. X. Each has a unique product ID and the only disc copy I can find for installing MS Office has a key on it. I don't know if it was my original copy. I will soon be reinstalling an OS on the iMac and in the process, I will have to wipe it clean. Is it possible to copy all of the MS Office files to appropriate backup locations, then copy them back when the install is done so I do not have to reinstall from the disc and risk it not be...

unable to paste Excel 2003 chart into Outlook 2003
(This was posted on "excel.charting" group.) I have a user who's unable to paste an Excel 2003 chart into Outlook 2003 email message. In Outlook options, the checkbox is selected for "Use Microsoft Office Word 2003 to edit e-mail messages". When I tested this on my own computer running the same version of Office, if the box is check, I have no problem pasting; if this box is cleared, I cannot paste. But on his computer, it doesn't work regardless. Thanks and regards, TL ...

Show date, time & day of week in one cell
Can I show the date, time and day of week in one cell. I have: 09/03/07 8:30 AM in one cell using the format (Format/Cells/Custom): [$-409]mm/dd/yy h:mm AM/PM;@ Excel refuses to accept ddd for Mon or dddd Monday at the end of the format I want it to read: 09/03/07 8:30 AM Monday in 1 cell. I have Excel 2003. One way: mm/dd/yy h:mm AM/PM dddd;@ In article <Xns99B8A3CAF9130pencilunlistedcom@208.49.82.220>, Burp <burp@beep.comINVALID> wrote: > Can I show the date, time and day of week in one cell. > > I have: > 09/03/07 8:30 AM > in one cell using the for...

print multiple pages on one sheet of paper
I am using mailmerge in Publisher to create placecards for a party we are hosting. The final size of the placecards is 1.5" by 1.5" and we have to print 100 final cards. Publisher gives me the option of printing multiple copies of the same page on one sheet of letter sized paper or one page on one sheet of letter sized paper. What I would like to do, however, is print multiple different pages on one sheet of paper. If I cannot find a solution for this, I will need to print 100 separate pages with a 1.5" square box of copy in the center of each sheet. In page setup, sel...

Disable Secure Sockets Layer on exchange server when using RPC over HTTP
Hi im trying to enable RPC over HTTP to enable users to establish contact to my Excahger server 2003 over the internet. Now, I dont want to use SSL (security not that important) and i am told by this article that i can disable SSL in windows registry. Quote: Note While RPC over HTTP does not require Secure Sockets Layer, you must modify the registry to enable RPC over HTTP if you do not want to use Secure Sockets Layer. Microsoft recommends that you enable and require Secure Sockets Layer for your RPC over HTTP communications. At this address: http://support.microsoft.com/?id=833401 But i ...

How to set "licence" for Access 2007 database?
Hi I developed an Access 2007 db to a client. Now I want to make a year based licence for that database that the client must pay if they want to continue using the database after year. It must be so that database cannot be used after this date. How I can accomplish this? Thanks! On Mon, 12 Apr 2010 13:14:17 -0700 (PDT), Sandroid <santeri.virtanen@gmail.com> wrote: >Hi > >I developed an Access 2007 db to a client. Now I want to make a year >based licence for that database that the client must pay if they want >to continue using the database after year. It mu...

Does Outlook use the DAV protocol?
I'm an Outlook Express user who wants to switch to Outlook. I received a notice from Microsoft that includes the following: "... as of June 30, 2008, Microsoft is disabling the DAV protocol and you will no longer be able to access your Hotmail Inbox via Outlook Express." Please tell me if this action by Microsoft will affect Outlook in the same manner, or am I free to make the switch. "BudV" <BudVitoff@(NO)att.(SPAM)net> wrote in message news:%230XUDi%23zIHA.2384@TK2MSFTNGP02.phx.gbl... > I'm an Outlook Express user who wants to switch to Outlook...

how do I add error bars to a 3D chart in excel?
The help states you can only add error bars to data series in 2D area. Is there a way to add them to a 3D chart? Hi, I would not have thought so. Obviously as it is not a built-in option the only way would be a work around perhaps using dummy series. Unfortunately you can create 3d combination charts. Stick with the 2d view. Cheers Andy elahe wrote: > The help states you can only add error bars to data series in 2D area. Is > there a way to add them to a 3D chart? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info I checked, and error bars are not offered for 3D ch...

microsoft.public.access.conversion
...

Default scene is solid blue but only on one account
I have 2 accounts with WLM, on one the default scene is as it should be, a mix of blue and white. But on the other account it is solid blue. If i change the scene in the program it changes to that but any contact windows i open continue to be solid blue by the persons name but above that is the new scene. I've done a repair job on 2 computers but does not fix the problem. Guesses? ...

Access to User Calendar
I have a user called small conference room that is used to schedule meetings on its calendar. I would like to link the calendar from our intranet site to the calendar with a UNC path. I am calling outlook: and I can get to my local mailbox and public folders but I am unable to connect to another users calendar. I am running Exchange 2003 and Outlook 2003. Is there some security modifications that need to be done? Any help is appreciated. Thanks, Steve I believe that you will need full mailbox rights. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!&...

Let me use the Line Color icon on charts
It would speed up a lot of my work if I could use the Line Color icon on Excel charts, the same way I am able to use the Fill Color and Font Color icons. However, when I highlight any chart object, like the Plot Area, Chart Area, or a Series, the Line Color icon is disabled. -- Stuart Bratesman, Jr., MPP Muskie School of Public Service Univ. of Southern Maine Portland, Maine ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If ...

Object pivot point
Is there a way to change the point at which an object will rotate? Or will it always rotate about the center? For instance, I would like a square to rotate about each corner. Thanks, Dave B You really need to invest in a drawing program. Serif has a free offering, DrawPlus 4. If you want the full feature version 6 it is $10.00. I use CorelDraw, it is simply a matter of moving the pivot point to the corner. I can't be sure Serif has this feature. I do know Publisher does not. You can use ruler guides to place your object and use the "format autoshape" to control the amount ...

Automatically copy input from one cell to another
After I enter a value in one cell, how can I have it automatically enter it into another cell, within the same worksheet, or into a different worksheet. Thanks, Tom picktr@wowway.co -- Message posted from http://www.ExcelForum.com If you enter the value in A1 of sheet1, put this in the other cell in sheet1: =A1 or in another worksheet: =Sheet1!A1 In article <picktr.15c6uy@excelforum-nospam.com>, picktr <<picktr.15c6uy@excelforum-nospam.com>> wrote: > After I enter a value in one cell, how can > I have it automatically enter it into another cell...

Mobile Access
When I try to reach our mobile access by typing http://serverIP/oma, I get the error... A system error has occurred while processing your request. Please try again. If the problem persists, contact your administrator. Any ideas what could be wrong? Thanks, Jose What is "oma" supposed to be? "Jose Alfaro" <ja@mkrs.com> wrote in message news:2cfc01c3fcaa$2e5247d0$a101280a@phx.gbl... > When I try to reach our mobile access by typing > http://serverIP/oma, I get the error... > > A system error has occurred while processing your > request. Please...

' in numbers and Pivot tables
I have a spreadsheet with multiple rows of the same ID number. The ID number (when you click on the cell) has a ' before the number. I have created a pivot table to condese this data into something more meaningful. (which works) However I do not see any ' in front of the ID number. I now need to use vlookup to lookup a value with the same ID as I have on another sheet. But when I use the vlookup formula, I get #N/A. However if I manually add ' in front of the ID in the main sheet it looks it up. There are thousands of rows, but I do not fancy putting an ' in f...

GPS 8 service pack 2 and add new company
After installing service pack 2 for GP 8, I am not able to add or log on to the new company. Error during upgrade is “Entries haven't made to all required fields. Would you like to show the required fields on all windows in greatplains” When I try to log on to GP getting another error “file for this company have not been updated” Please help Rajesh ...

Effective VBA Code for Conditional Charting
Hello there, in a line chart, I need to show 3 different markers / colors for data points depending on whether the basic data to be shown are =, > or < zero. My attempts to code this in vba works, but very slowly. I suspect there is an effective way to do this, but can't find it. Does anyboday know better ? Thank you in advance, Kind regards, H.G. Lamy Hi H, Maybe you don't need VBA code at all. Have a look at Jon Peltier's examples on conditional charts. (http://www.geocities.com/jonpeltier/Excel/Charts/format.html#CondChart) You should be able to modify the techn...

Problem with different versions of Access
Hello, I am working on a VBA Access pplication which connects to a SQL Server database. I have a continuous form displayed with data, ad it is linked to a database table, so when I enter a value from my form the data in instantaneously updated in the database. The problem I have is that this form works perfectly when I am developping, and using my developpement environement (with Access allowing me to set breakpoints, go step by step in the code and so on), but it does not work when I use it in the PC of the ending user : in this case, when I enter a value in the form, and click in a...