Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MSChart help - damzil in distress!

Posted on 2004-04-05
10
Medium Priority
?
216 Views
Last Modified: 2013-12-25
Hi guys, i have a little problem,

I have a database called 97medical.mdb.

In this database are some tables, and one in particular called "patient".

In patient table, there is a field called "gender", in which it specifies if the patient is a male or female..

What i want to know is how do i create a bar graph, showing how many male patients are on the database and how many female patients there are?

I am really really new to this, so it would be great if you could post each step by step.

Many thanks in advance you lurvley people!  (Oh what! - no smileys, o well....cheeky_galuk winks)LOL

ps,i,m using VB6.
0
Comment
Question by:cheeky_galuk
[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
  • 5
  • 3
10 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 10759875
Take a look here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjVtChartObject.asp

Basically once you have the numbers from the database just setup the properties of the object.

Leon
0
 

Author Comment

by:cheeky_galuk
ID: 10760677
Hey there Leon,

thanks for that, but i,ve already tried MSDN, planet-source code and other various sites/books, but i really dont understand it.

That MSDN site is soo confusing.  Why dont microsoft write that sort of help in proper english so that complete newbies like me can understand it.

o well, enough ranting -

When you mean numbers from the database, how do you mean?

I thought that VB would calcualte how many patients are male and how many are female by reading it from the database.?

Thanks + looking forward to your reply...
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 10761750
Create a connection to the database, setup an DAO or an ADO object and write a SQL query to return you the number of male and female patients, something like:

SELECT COUNT(gender)  FROM patient WHERE gender = 'male'
UNION
SELECT COUNT(gender)  FROM patient WHERE gender = 'female'

Now you have a recordset with the number of men and women, you can then display these values any way you need to.

Leon

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:cheeky_galuk
ID: 10763874
Hi leonstryker,

sorry if i am asking silly questions, but i,m not that familar with VB..

how do i set a DAO/ADO object to my database?

Also, that SQL query, do i type that into the MSChart1's code page?

Once again, sorry if this questions seem silly to you, but i,m not too familar with this..

thanks
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 10765200
cheeky_galuk,

You are asking at least 3 separate questions here and it seems you do not have I lot of experience with VB as well.  Is this project by change school work?

Leon
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 10765522
Same question by different person:

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/VB_Databases/Q_20941092.html

You guys must be taking the same class.  ;)

Leon
0
 

Author Comment

by:cheeky_galuk
ID: 10765854
LOL, Leon, i am 38 years old and can assure you i am not at school, lol

As it is holidays here, i decided to pratice with some VB stuff, and just asking out of curiosity,

as for the the other post, i actually didnt see that on here, but similar question - i agree..
0
 
LVL 29

Accepted Solution

by:
leonstryker earned 500 total points
ID: 10765984
Well the first thing you need to know is to how to use ADO so take alook here:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12050&lngWId=1

Leon
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

609 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