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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DCount help

Status
Not open for further replies.

Moxy1

Programmer
Aug 29, 2002
75
US
I am stuck on a DCount issue. I have the following DCount on a report which works great:

=DCount("[Group_Responsible]","tblCallLog","[Date_Entered] Between # " & [Forms].[frmDateRange].[Beginning_Date] & " # AND # " & [Forms].[frmDateRange].[Ending_Date] & " # ")

This will give me a count on all calls between a date range. However I need add addtional criteria. In addtion to the date range a need to have it pull for a particular Group Responible as follows:

=DCount("[Group_Responsible]","tblCallLog","[Group_Responsible] = 'Group 1'")

Question: How do I get this to work in 1 DCount function

Thanks,
Moxy
 
Just string another AND in your sql where clause

=DCount("[Group_Responsible]","tblCallLog","([Date_Entered] Between # " & [Forms].[frmDateRange].[Beginning_Date] & " # AND # " & [Forms].[frmDateRange].[Ending_Date] & " #) AND [Group_Responsible] = 'Group 1'")
"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
It's always the most obvious isn't it?

Thank you so much for you help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top