Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count of If Statement

Status
Not open for further replies.

nike2000

Technical User
Apr 1, 2003
61
GB
Hi there,
I have the following If Statement populating a field on a continuous form:

=IIf([AllChecks]="Yes","Yes","No")

I would like to display in the Form Header the number of records that are "Yes".
How can I count the results from this If Statement.
Thanks,
Nike
 
Add an unbound textbox to your header and in the control source type = Count(*)

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Trendsetter,
Unfortunately that hasn't worked.
Do you have any other suggestions.
Thanks,
Nike
 
I finally got it to work.
I used the following:

=-sum([Allchecks]="Yes")

Thanks for your help.
Nike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top