p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Expert One-on-One Access Application Development (http://p2p.wrox.com/forumdisplay.php?f=131)
-   -   Charts by VBA (http://p2p.wrox.com/showthread.php?t=13785)

jaymur June 4th, 2004 02:56 PM

Charts by VBA
 
I primarily bought the book for the section on exporting to Excel, but really I don't want to export to Excel. I would like to create a chart in VBA within Access.

I see that there is a chart object and a chchart.series.add or something like that. Do you have any examples of charting within Access using VBA? I found an msdn example but mostly oriented toward publishing to a web page. Most examples I see are either not using VBA but demonstrate manually creating the chart or utilizing Excel through automation. Is there anything wrong with doing this within Access?

HelenFeddema July 8th, 2004 07:34 PM

MS Graph (or Chart) was used many versions ago; it has since been replaced by PivotTables and PivotCharts, which are much easier to use and more versatile. See Chapter 5 for information on working with these objects in the Access interface. I don't cover creating PivotTables and PivotCharts in VBA code in the book, but it can be done.

Helen Feddema
Kerhonkson, NY
hfeddema@hvc.rr.com
http://www.helenfeddema.com
Read Woody's Access Watch
http://www.woodyswatch.com/waw/

jaymur July 8th, 2004 11:04 PM

I thought with a pivot table you are changing the arrangement of the data like taking row entries and using those as column headings.

I just wanted a regular bar chart. I think I have gotten the charts I want in Access with VBA, now. I found a way to create a trendline by using a constant value as another series, hiding the series bars by making them the same color as the background of the chart and then using the trendline option on that series. Is there a better way? Right now my trendline looks like a dashed line where my camouflaged bars go through it.

I also want to make use of the material in your book on exporting to Outlook because I have a database for creating invoices and currently I just manually create a pdf and then email it, but I have wanted to automate this. I have to finish the charting stuff first but I think I have what is needed.

What I appreciate about your books is the way in which you use forms. I was amazed to see how your forms are so neat and consistent along with being very functional.

jaymur July 8th, 2004 11:08 PM

I used the Microsoft Office Chart 10.0 active X control.

HelenFeddema July 12th, 2004 09:07 PM

You are right about PivotTables -- they arrange data in rows and columns. PivotCharts, however, are graphical -- you can create bar graphs, pie charts, line graphs, and more, with all sorts of fancy formatting. They are much easier to work with than the old MS Graph charts.

Helen Feddema
Kerhonkson, NY
hfeddema@hvc.rr.com
http://www.helenfeddema.com
Read Woody's Access Watch
http://www.woodyswatch.com/waw/

HelenFeddema July 12th, 2004 09:09 PM

As far as doing invoices with a link to Outlook is concerned, see my Code Sample #29 (on the Code Samples page of my Web site, www.helenfeddema.com). This is my Time & Expense Billing application, which uses custom Outlook journal items to store time worked and expenses incurred for clients, and then produces Word invoices.

Helen Feddema
Kerhonkson, NY
hfeddema@hvc.rr.com
http://www.helenfeddema.com
Read Woody's Access Watch
http://www.woodyswatch.com/waw/

zara2006 June 8th, 2006 12:58 AM

Hi
I ;m not expert a bout your problem but I know a site a bout chart maybe this chart coud help you for solving your problem.
thanks a lot
Zara:)



zara2006 June 8th, 2006 12:59 AM

noe I introduce this link for you(http://www.e-charts.com)
Zara



All times are GMT -4. The time now is 08:00 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.