Dcount Error

C

cp2599

I'm creating a statistical report and can't seem to get the Dcount to
work. It works fine if I stop it after Accepted. Can someone please
tell me what's wrong with the Date portion of this statement.

=DCount("lngzID","tblStatus","chrStatus = 'Accepted' and dtmDate
between #1/1/2009# and #9/31/2009#")
 
D

Douglas J. Steele

Sometimes Access gets confused with AND, but using parentheses usually
resolves the problem:

=DCount("lngzID","tblStatus","chrStatus = 'Accepted' and (dtmDate between
#1/1/2009# and #9/31/2009#)")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top