Dcount Error

  • Thread starter Thread starter cp2599
  • Start date Start date
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#")
 
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#)")
 
Back
Top