473,569 Members | 3,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9097
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
5260
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 that the creater of the even can make their own event in the database. When they do so a 2 tables are created. One for the entries such as names...
2
2494
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 the same number of months. When using DB2 the below code counts the average contracts of each group for 2003. What code can I use in MS ACCESS to...
1
9184
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 will work for 9i and even 10g ) No one had what I needed, so I wrote it myself. I Rule. This code isn't going for efficiency, and isn't trying...
7
8835
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and...
11
6566
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 where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am...
4
6380
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 to look a and I am loosing tremendious amounts of time trying to organize it so that I could view it. Regards, Alexandre Brisebois
2
2012
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 project name, one primary point person for it (1:N list from a separate table), other details, and a manually entered tracking number, which is the...
9
3929
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 - I have read every post out there and spent hours trying to figure out the problem with no success whatsoever - I have constrained the problem to...
2
6220
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 Table/Query. Or it could be a value list, a static list of data. But what if your information is not held in a table, and it is not a static list. Examples...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.