Count question - TIA for help

  • Thread starter Thread starter Someone
  • Start date Start date
S

Someone

Hi all,

Can someone please help with a 'counting' question?

I have a table where each record has several dates related to it
(I'll use 3 dates for my example but there are several more)

created date
appointment date
closed date

I want to summarise the data like this....(Selection of data is by a parameter
on date range at run-time)

result to be....

1 count of total records (based on created date) ie grand total records in
report
2 count of records where appointment date=created date
3 count of records where appointment date<>created date

Any advice appreciated


TIA

Bob
 
One simple way is to include a calculated field in the query for the second
and third counts you describe... if those conditions are met, set the
calculated field to 1. Use the Count function to get the first total (all
records), and the Sum function to sum each of the calculated fields for the
other two counts.

All will work either in a Group Footer or the Report Footer, giving you the
Count/Sum for the Group or the Count/Sum for the Report, depending on the
Footer where you use them.

Larry Linson
Microsoft Access MVP
 
Back
Top