Full Version: DCount Formula Gives Wrong Answer
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
boriss
Can someone help me with getting this to work.....

Am trying to Count the check boxes that are TRUE AND between date range.

=DCount("[Bac_T_Fish]","Specimen Query","[Bac_T_Fish] =-1" & [date] Between #1/1/2006# And #1/31/2006#)
aoh
Try

"[Bac_T_Fish] =-1 AND #" & [date] "# Between #1/1/2006# And #1/31/2006#")

However, date is a reserved word, and will probably cause you problems here.
boriss
I renamed the [date] to avoid problem - however I get Syntax Error no matter what i do
aoh
Sorry - bit of a typo in there

"[Bac_T_Fish] =-1 AND #" & [date] & "# Between #1/1/2006# And #1/31/2006#"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.