Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Charting record Counts

Status
Not open for further replies.

briggsy79

Programmer
Feb 23, 2001
68
SE
hi folks,
I asked this question a while ago but i didn't word it as well as i could have so here i go again:
I want to chart (bar) the number of times a name comes up in one field of a database. At the moment im trin to loop through find a new name and open the database with that name (where name like "David"...etc), then do a record count. This isn't working (its obviously my error). If any one could give me any good code,(im completely stuffed) i would be ever gratefull.
Eg.
David
David
David
Brian
David
Keith
Brian
-------------
Brian = 2
David = 4
Keith = 1 (then graph these)

P.S. ive looked at the MSDN example and it didn't help me that much. Except for the actual graphing. not counting
 
If your database supports it, use the group clause in your query.

select name, count(*) from table
group by name
 
How would i know this? (it is access 2000)

Then What?
Sorry if i sound stupid...(im still learning)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top