Solved

Connecting MS Chart with MS Access Database

Posted on 2000-04-07
9
212 Views
Last Modified: 2013-12-25
Currently I have created database using the MS Access then I used the Visual Data Manager to create a data form, but still don't know how to create a chart.

The table in the database has several column e.g. company_name, price, and transactions.

How to create a chart, by using MS Chart to show the data stored in the database (trade.mdb)-> X-axis=company_name and Y-axis=price ???
And how to create the legend?
0
Comment
Question by:johanesj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
9 Comments
 

Author Comment

by:johanesj
ID: 2695680
Adjusted points from 0 to 77
0
 

Author Comment

by:johanesj
ID: 2695681
URGENT !!
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 77 total points
ID: 2697178
The M$Chart control is a turd and should be deleted from your system as it isn't worth the disk space it takes up.

Even if you can get your chart to look nice you'll run into a *nasty* surprise when you find out the !@#$%^ thing doesn't have a .Print method! Yes, you can FormPrint it but it'll look like *crap* when it hits the paper.

Now myself, I've found that for 2D work you can easily draw a chart on any form or picturebox by setting the .Scale property and then using the .Line and .Circle commands to render what you want. You can move the print cursor with .CurrentX/Y and .Print whatever text you want whereever you want in whatever font you want.

With just minor changes you can make the *same* routine act as both your on screen print preview rendering routine as well as the final print driver. You simply pass an Object to the routine as a parameter and then the .Scale etc are all on that object instead of hard coding the picturebox. If you want to show it on screen pass it the picturebox or a form, if you want it on paper pass it the Printer object.

Within the routine itself you'll have to put conditional logic around a few statements that aren't common to both types of control. You can't .Cls the printer and you can't .EndDoc a picture box. Use a statement like:

If TypeName(Obj) = "Printer" then ...

to gate around the few device specific statements.

Anyway, this will give you much better control over your graphs and the ability to print with the full resolution possible on your printer.

M
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 6

Expert Comment

by:Marine
ID: 2697738
Hey Mark wanna give me some code example on that ? I would like to do that as well. For example i have field
catagories in books. And i want to show one catagory has this many books the other has so many books and the last has that many. How would i plot the values for these ? Thanks.
0
 
LVL 6

Expert Comment

by:Marine
ID: 2697774
Hey mark would this work if i do so or just point me to rgiht direction. Say i get a recordcount of how many records i have in each catagory . And then just plot the number of records i have. Would that work for this ?
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2697923
You can easily plot stuff. Check out my web page and there is an app there that does exactly what you're after (if the link is dead let me know, my site got toasted at the first of the year and I'm still rebuilding...)

www.netexperts.cc/~lambertm

M
0
 
LVL 6

Expert Comment

by:Marine
ID: 2697997
Wow Mark this is really cool it looks Great. My problem is understanding math there a little bit. Mind if i ask you a few questions here and there on your code ? I just want to understand it more clearly. Thank you.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 2698382
No problem. Email me direct at lambertm@netexperts.cc

M
0
 

Author Comment

by:johanesj
ID: 2727061
WHat I want is to use MS CHart not draw manually using line.
But thanks mark :)
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to make an ADE file by code? 11 109
RUNRMTCMD from AS/400 13 128
Publisher:   Unknown     VB.exe Application 1 31
how to loop through and process two columns in excel 8 72
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question