Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a statement to count in a report

Status
Not open for further replies.

Mksmall

Technical User
Oct 18, 2001
18
US
I've created a report that is based on a query. In this query I'm pulling in a table field called "events". There are a total of 18 differnet type of events in this field. I've listed those events on the report, but now I'm trying to get a total count of each event during a stated time period and have that total out to the side of my list of events.

event 1 (#)
event 2 (#)

and so on

I've tried a simple =count but I get a syntax error. I've had no success with DCOUNT either. Does anyone have an idea on what kind of statment I can put each box to generate what I'm looking for
 
I would have thought that dCount is what you need.

=dCount("events","TableName","[events] = 'event1' and [dateField] between " & date1 & " and " & date2)

or something along those lines. Appologies if syntax is incorrect.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top