PDA

You are currently viewing a search engine-friendly (archive) version of this page.

View Full Version : Using VB to do a calculation on Access data


bobw
November 10, 2001, 09:41 am
I have VB6 and Access 2000 and am trying to create a VB program to analyze my golf scores. I created an Access database that stores records of golf scores on each hole of various courses.

I have the following fields in the same table (simplified here):

"Course" - lists name of each golf course.
"Par" - lists the par for each hole (either a 3, 4 or 5).

I cannot figure out how to calculate (count) the total number of par 3's for the table.

For example, if I have entered data on 36 different holes in the table, then 15 holes may be par 3; 14 may be par 4; and 7 may be par 5.

I want to click a command button in VB and have the program display the answer that there are 15 par 3's in my table.

I know this is probably very simple to do, but as a newbie I have tried everything I can in queries and can't seem to get a total. Any suggestion would be appreciated.

Tonker
November 15, 2001, 09:53 am
My SQL is a bit rusty I'm afraid. I'll install access at home in the next few days and see what I can come up with for you.

Other than that try searching for a tutorial on SQL on the web, you should be able to learn a quick query that way.