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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access - Count of Different Items

Status
Not open for further replies.

dorita

Technical User
Oct 14, 2002
1
US
I'm new to Access, so please bear with me!!

I have a 12-question survey -- each with an answer of YES or NO (did NOT use the "yes/no" field).

I need to add up all of the "YES" for questions 1 thru 12; and the same with "NO".

Any help and/or suggestions how I can go about this would be GREATLY appreciated. THX
 
As you're in the Reports board - I'm assuming that this question is related to a report - even though you don't say so.

I'm using "Result" as the name of the answer control on the form. - Change "Result" to whatever you are using.
Have a hidden text box control on the report (Called SumOfYes) with the
ControlSource = Iif(Result = "YES",1,0)
RunningSum = SumOverGroup

Have a second hidden text box control on the report (Called SumOfNo) with the
ControlSource = Iif(Result = "NO",1,0)
RunningSum = SumOverGroup

Then have two text box controls in the footer - or where ever appropriate, so that
Total of Yes = ControlSource = SumOfYes
Total of No = ControlSource = SumOfNo


'ope-that-'elps.

G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top