Dcount

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have a form with a bound box that i can't seem to get
working. I am using the following command: =DCount
("[DateMI]","[qryResidentsMain]","[qryResidentsMain]!
[Date] = [qryResidentsMain]![DateMI]"). What am I doing
wrong?
 
I have a form with a bound box that i can't seem to get
working. I am using the following command: =DCount
("[DateMI]","[qryResidentsMain]","[qryResidentsMain]!
[Date] = [qryResidentsMain]![DateMI]"). What am I doing
wrong?

Are Date and DateMI both fields in the Query? If so, you don't need to
name the query in the criterion (or, if you do, you should use a .
rather than a ! delimiter).

Also, you're not really counting DateMI - you're counting records. You
should get the result you want using

=DCount("*", "[qryResidentsMain]", "[Date] = [DateMI]")

Do note that Date is a reserved word and Access will sometimes confuse
it for the Date() function, returning the system clock date - but I
don't think this looks like a case where that's the problem.
 
Back
Top