DCount criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box on a report that I am pulling from ROLE Analysis query. My
issue is that the report (query) is not reading the criteria correctly and
pulling the right information.

I have tried placing the criteria in the query itself but it is not reading
my between criteria. It works if I have a <> signs but not between.

ROLE (a percentage)is a caluculation in my query that pulls from two other
calculations in the same query. Do I need to add something to this in order
to make it pull all sales less than 50000000 that have an ROLE between 0 and
..9999?

=DCount("[CountofLOLAcctNo]","ROLE Analysis","[Sales]< 50000000 AND [ROLE]
between 0 and 0.9999")

Thanks,
 
jderrig said:
I have a text box on a report that I am pulling from ROLE Analysis query. My
issue is that the report (query) is not reading the criteria correctly and
pulling the right information.

I have tried placing the criteria in the query itself but it is not reading
my between criteria. It works if I have a <> signs but not between.

ROLE (a percentage)is a caluculation in my query that pulls from two other
calculations in the same query. Do I need to add something to this in order
to make it pull all sales less than 50000000 that have an ROLE between 0 and
.9999?

=DCount("[CountofLOLAcctNo]","ROLE Analysis","[Sales]< 50000000 AND [ROLE]
between 0 and 0.9999")

The letters R O L E are inside the quotes, so they're part
of a string. You want to use the value of Role so it must
be outsife the quotes:

=DCount(...,"[Sales]< 50000000 AND " & ROLE & between 0 and
0.9999")
 
Back
Top