Count Records

skydiver

Registered User.
Local time
Today, 09:56
Joined
Nov 5, 2010
Messages
102
Access 2010. I've created a query with four fields:

  1. Date
  2. Trucks
  3. Buses
  4. Cars
The Date field in my query is set to "Group By." The other fields are "Sum" totals. On any one particular day there can be numerous records. The "Sum" fields will give me the sum for each day. I would like to count each record for each day in my query. Please help. Thanks!
 
Date is a reserved word in Access, you should probably rename if to MyDate to TransDate or something. You will need to suuround it with []
eg [Date] to avoid issues.

Instead of Sum, use Count -something like this (untested)

Select Count(Buses), Count(Cars), Count(Trucks), myDate
from YourTable
Group by myDate
 

Users who are viewing this thread

Back
Top Bottom