FRUSTRATED...

  • Thread starter Thread starter T Best
  • Start date Start date
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
 
No your syntax is wrong.

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

Hope that helps!
 
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

Similar Threads

Dcount the values 0
A03 - count in report footer gives me #Error? 0
Intel 8th-gen CPU Launch 2
SQL Join Question 0
Array to SQL question 5
Access Dcount (multiple criteria) 3
Access Dcount function in access 0
counting records 0

Back
Top