473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Counting values in a field

Hi,

I am working in a MSAccess Db
I have a table with PartNumber, Cost, and Cost_Group. The table has more than 200000 records. I am looking for a count of items in the different Cost-Groups (from 1 to 10):

Something like this:
Cost_Group Record Count
1 15321
2 20451
3 9987

etc.

Many thanks for your help
Sep 27 '07 #1
2 1122
Hi,

I am working in a MSAccess Db
I have a table with PartNumber, Cost, and Cost_Group. The table has more than 200000 records. I am looking for a count of items in the different Cost-Groups (from 1 to 10):

Something like this:
Cost_Group Record Count
1 15321
2 20451
3 9987

etc.

Many thanks for your help
You need to build a Select query and have it group by as well as count of the Cost_Group field:

SELECT tblMain.Cost_Group, Count(tblMain.Cost_Group) AS CountOfCost_Group
FROM tblMain
GROUP BY tblMain.Cost_Group;

You'll need to change [tblMain] to the name of your table.
Sep 27 '07 #2
Thanks very much it did teh trick.
Sep 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: calan | last post by:
Having a brainfart.... I need a query that returns a record count, based on two distinct fields. For example: Order Revision Customer 001 1 Bob...
14
by: Mike N. | last post by:
Hello: I have a form that contains a multiple-select field that has 12 options in it. I would like the user to be able to select UP TO FOUR of those options. If they select more than four, I...
3
by: Megan | last post by:
hi everybody- i'm having a counting problem i hope you guys and gals could give me some help with. i have a query that retrieves a bevy of information from several different tables. first let...
4
by: Dado | last post by:
I have a next situation with the textbox field: A - B = C 1. How to fill the A fill with the data from my previous recordset ? Can I do it with the expression builder ? 2. I want that every...
1
by: Orbie | last post by:
Hi All, I'm new to VB.NET and i'm looking for some help with my Windows Form. I need to check if a Commodity entered into (TextBox1.Text) already exists on my table before i insert it. I'm having...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.