Solved

MSChart help - damzil in distress!

Posted on 2004-04-05
10
204 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
  • 5
  • 3
10 Comments
 
LVL 29

Expert Comment

by:leonstryker
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:cheeky_galuk
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 29

Expert Comment

by:leonstryker
Comment Utility
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
Comment Utility
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
Comment Utility
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 125 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now