Count records for each Year

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to create a form that will count the number of records that were
created each year.
What I am thinking is a text box with “2004†“2005†and one for “2006†and
then under each one “Number Of Recordsâ€

Any help would be greatly appreciated.

Tammy
 
You can create a group by query, with count on the year

SELECT YearField, Count(YearField) AS CountYearField
FROM MyTableName
GROUP BY YearField

That will list the Year as
YearField CountYearField
2003 23
2004 45

If the Year is actually a date Field then you need to Change the date field
to year
SELECT Year(DateField), Count(Year(DateField)) AS CountYear
FROM MyTableName
GROUP BY Year(DateField)
 
Use a cross tab query and select count records in the criteria of the wizard
breaking it out by year on the date field.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top