Counting Records with a certain value

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

Guest

Hi,

I want to be able to generate a report that counts the number of instances
that the number 2 appears in a field called BookingStatusID in a table called
Booking.

How do I do this please? Do I do in it with a query or directly on a report?
Thanks all~!
Bard
 
If you do it in a report, try the following for the control data source:
DCount("*","Booking","BookingStatusID=2")
Or if you're simply looking for the number 2 anywhere in the field:
DCount("*","Booking","BookingStatusID Like '*2*'")
HTH.
 
Back
Top