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
 
Back
Top