dcount with criteria

J

jderrig

I am trying to get my control source on my report to count the number of
accounts that have sales of Sales <10000000 and have management as a result
in Noncompete. I currently have the following but it does not produce the
correct results. I have tried every variation I can think of but nothing is
working.

=DCount("[CountOfAccount #]","Grain Accounts","Sales <10000000" And
[Noncompete]="management")

Thanks
 
D

Dennis

Try this

=DCount("[CountOfAccount #]","Grain Accounts","Sales <10000000 And
[Noncompete]='management'")
 
J

jderrig

That works perfectly - THANKS

Dennis said:
Try this

=DCount("[CountOfAccount #]","Grain Accounts","Sales <10000000 And
[Noncompete]='management'")

jderrig said:
I am trying to get my control source on my report to count the number of
accounts that have sales of Sales <10000000 and have management as a result
in Noncompete. I currently have the following but it does not produce the
correct results. I have tried every variation I can think of but nothing is
working.

=DCount("[CountOfAccount #]","Grain Accounts","Sales <10000000" And
[Noncompete]="management")

Thanks
 
D

Duane Hookom

You might also try:
=Sum(Abs([Sales] <10000000 And [Noncompete]="management") )
 
Top