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

Counts of Option groups

Status
Not open for further replies.

dannyocean

Technical User
Jan 26, 2001
136
US
Hello All,

I have a form with 43 questions that are answered with a choice in an option group. Each option group can either be yes, no or N/A. I need to be able to count all of the answers by type, ie # of Yes # of no. I need to do this to calculate a score. I need to be able to add up all questions that were answred yes or no and divide that number into the no of no's.

TIA,

Danny
 
Look at each of the Option Group controls and determine the responses. Here is a snippet to demostrate looking at each Option Group control. The object frm was passed in as a parameter.

Dim i As Integer
Dim ctl As Control
On Error Resume Next

For i = 0 To frm.Controls.Count - 1
Set ctl = frm.Controls(i)
If ctl.ControlType = acOptionGroup Then
ctl = UCase(ctl)
End If
Next i

-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Thanks for the repsonse. I am not good with code, so where would I place this?
 
I chickened out of using Access to calculate the up to 7 different results of a 100 question questionaire.

I exported the table of answers to exvcel and used that to do all the calculations.

Telephoto
 
Telephoto,

I wish I had that as an option. I am building this to score case file audits. I need to have history and a printed copy of the audit after each entry so Access is my only real option.

Danny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top