473,385 Members | 1,872 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,385 software developers and data experts.

Access 2000: Need a count of entries by state.

I have an Access 2000 database (42,000+ records) for which I need a
count of records by state (AL=320, AK=92, NY=1,932, etc). Obviously,
I don't want to (and probably can't...) do the count manually. I know
there is a Count function, but I don't know how to make it work. Can
anyone help me, please?

As an aside, I tried to export the data to an Excel spreadsheet, but
it will NOT save as a new file. I have no idea why that is the case
(not read only, no macros or extraneous code that I can see), but then
I did not create the db.

Thanks again!!!
Nov 12 '05 #1
3 9092
C. Homey previously wrote:
I have an Access 2000 database (42,000+ records) for which I need a
count of records by state (AL=320, AK=92, NY=1,932, etc). Obviously,
I don't want to (and probably can't...) do the count manually. I know
there is a Count function, but I don't know how to make it work. Can
anyone help me, please?
Create a new query based on the table whose records you want to count.
Add the State field and any other field to the query grid. (The second
field must be one that contains an entry for every record).
Convert the query to a 'Totals' query by clicking the Totals button on the
toolbar.
A Total row now appears in the query grid. It says 'Group By' for both
columns. Click into the second column, in the Group By entry. Now click
the drop-down arrow that appears. Select Count from the list.
Save the query.
Run the query.
As an aside, I tried to export the data to an Excel spreadsheet, but
it will NOT save as a new file. I have no idea why that is the case
(not read only, no macros or extraneous code that I can see), but then
I did not create the db.

Thanks again!!!


Not enough information.
What happens when you try to export it?
Is there an error message?
Regards

Peter Russell

Nov 12 '05 #2
Create a query using GROUP BY clause:

SELECT COUNT(*) FROM MyTable GROUP BY State

Cheers,
Pavel

"C. Homey" wrote:

I have an Access 2000 database (42,000+ records) for which I need a
count of records by state (AL=320, AK=92, NY=1,932, etc). Obviously,
I don't want to (and probably can't...) do the count manually. I know
there is a Count function, but I don't know how to make it work. Can
anyone help me, please?

As an aside, I tried to export the data to an Excel spreadsheet, but
it will NOT save as a new file. I have no idea why that is the case
(not read only, no macros or extraneous code that I can see), but then
I did not create the db.

Thanks again!!!

Nov 12 '05 #3
THANK YOU BOTH!!! I got the count to work and what a time/life saver!!!!
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ben | last post by:
My current project requires me to create part of a form that is created on the fly. The project consists a list of entries to an event. The name and address and such is easy. The design is detup so...
2
by: Mark | last post by:
I am producing a report that requires me, among many other things, to calculate the average contracts for about 1000 companies during the yr 2003. The "quirk" is that all the companies do not have...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
2
by: collegekid | last post by:
Hi everyone, basically my problem is this: I am using an Access 2000 format. And--I have four subforms in my main form. (Purpose of this is to track projects.) So in my main form I enter the...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
2
by: Lysander | last post by:
I have not seen this feature documented before, so I thought I would share it with you, as I will be using it in a later article. For a combo or list box, the source data is normally a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.