I misspelled something. Oops. Your code works great. Thanks!
Now, if instead of the coded dates
([q1Main.DRef]>=#06/01/02# And [q1Main.DRef]<=#06/30/06#)
I want to add the dates from a parameterForm, it would seem like this
would work:
=DCount("[DRef]","[q1Main]","[q1Main.DRef]>=[Forms]![fgetStats]![tbxBegDate]
And (q1Main.DRef)<=[Forms]![fgetStats]![tbxEndDate]) And
[q1Main.CaseType]='CUS'")
It doesn't. Do I have another paren messed up, or something worse?
TIA, AA
zSplash said:
Thanks for that. (I had just added a paren at the end of the statement.)
Still getting the "#Error". Will keep trying... Thanks again for the
help.
Douglas J. Steele said:
Just noticed that the parentheses are off as well.
=DCount("[DRef]","[q1Main]","[q1Main.DRef]>=#06/01/02# And
[q1Main.DRef]<=#06/30/06# And [q1Main.CaseType]='CUS'")
Sorry about that.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Thanks, Doug. Now, instead of getting 0 as the count, I'm getting
#Error. What does that type of error indicate? (Once again, I know
there's something to count.)
message Your quotes are wrong.
=DCount("[DRef]","[q1Main]",("[q1Main.DRef]>=#06/01/02# And
[q1Main.DRef]<=#06/30/06#) And [q1Main.CaseType]='CUS'")
(that's And [q1Main.CaseType]= ' CUS ' " at the end)
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
I am using the following for a form's textbox controlSource:
=DCount("[DRef]","[q1Main]",("[q1Main.DRef]">=#06/01/02# And
"[q1Main.DRef]"<=#06/30/06#) And "[q1Main.CaseType]"="CUS")
The count is 0, but I know the count should be larger than 0. Does
anyone see something goofy in my code?
TIA