Hi,
I have a report that has a query as its record source.
The query picks up records from a table that meet certain criterion.
The report then counts how many records there are for each key (room
number) - but does some calculating by date to see whether to increment
the count.
Then the report lists the Room Number, and the Count.
The way it is now, if the count for a room number is 4, it will
display:
Room Count
-------- --------
200 1
200 2
200 3
200 4
What I'd like to do is ONLY print the last line.
I don't think I can do this via my query, because Count is not on my
table and is calculated in my report's VBA. The logic I use is: if
one record and the next have an ActivityDate within 11 days of each
other, the count is 1. If it is over 11 days, the count is 2. And so
on with the next record, etc. In my VBA, I check record-by-record. I
don't think this logic can be done in a query, can it?
Is there a way to do this, either by my report (and only print the last
detail line for a room number), or by query?
Thanks so much for any help!
Lori