Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Counting results of "yes" check boxes and combo box selections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
compliance data - 31 Mar 2008 17:09 GMT
I have created a report that contains the results of data entered through a
form/subform sucessfully. However within the Report Footer i would like to
create a summary report of certain aspects contained in the main body of the
report.

2 cases;
1. In the input form I have a combo box with 2 selections say [C] &[ M] I
would like to count how many C's  and howmany M's are contained in the report

2. also on the input form I have 3 check boxes to identify special
circumstances. I would like to count the "yes" responses for each of the 3
check boxes.

I have tried count, countif, IIF with no success
Assistance please Thank you
Duane Hookom - 31 Mar 2008 17:20 GMT
Case 1) If the combo box will always, forever, constantly contain only 2
selections and never more than 2, you can use two text boxes with control
sources like:
  =Sum(Abs([UnnamedField]="C"))
  =Sum(Abs([UnnamedField]="M"))

Case 2) similar to Case 1
  =Sum(Abs([ChkBox1Field))

Signature

Duane Hookom
Microsoft Access MVP

> I have created a report that contains the results of data entered through a
> form/subform sucessfully. However within the Report Footer i would like to
[quoted text clipped - 11 lines]
> I have tried count, countif, IIF with no success
> Assistance please Thank you
fredg - 31 Mar 2008 17:27 GMT
> I have created a report that contains the results of data entered through a
> form/subform sucessfully. However within the Report Footer i would like to
[quoted text clipped - 4 lines]
> 1. In the input form I have a combo box with 2 selections say [C] &[ M] I
> would like to count how many C's  and howmany M's are contained in the report

Just add 1 for each value that is a "C", or "M".

Using unbound text congtrols in the Report Footer:
=Sum(IIf([ComboName]="C",1,0))
=Sum(IIf([ComboName]= "M",1,0))

> 2. also on the input form I have 3 check boxes to identify special
> circumstances. I would like to count the "yes" responses for each of the 3
> check boxes.

Combo box values are either -1 or 0, so all you need do to count the
Yes responses is Sum the boxes. The ABS() function returns the
positive value

Using unbound text controls in the Report Footer:

=ABS(Sum([CheckBoxA]))
=ABS(Sum([CheckBoxB]))
=ABS(Sum([CheckBoxC]))

> I have tried count, countif, IIF with no success
> Assistance please Thank you

Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.