FRUSTRATED...

T

T Best

hey all,

hopefully i'll be able to explain this right. i have a text box in a footer
that is doing a record count of coverages. i have 2 different coverage
codes. i only want the footer to count the records where the COV ='GEN'.
this is what i have but i'm getting a syntax error. is the code sort of
right or am i doing it wrong?

=" (" & Count(*) WHERE [COV]='GEN' & " " &
IIf(Count(*)=1,"policy","policies") & ")"

TIA
Ted
 
J

Jeff L

No your syntax is wrong.

=iif(DCount("COV", "YourDataSource", "Cov = 'GEN'") = 1, "policy",
"policies")

Hope that helps!
 
D

Duane Hookom

Try:
=" (" & IIf(Sum(Abs([COV]="GEN")) = 1, "policy","policies") & ")"

Using DCount() is a waste of resources and might not be accurate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top