Thanks for everyone's help.
Here is how I finally accomplished it. I used a variant of Sean's example:
CFLOOP INDEX="field_name" LIST="#form.fieldnames#"
cfoutput#evaluate('form.' field_name)#/CFOUTPUT
/CFLOOP
I gave every check box a name (Q1,Q2,Q3...) -I'm only up to 21 right now.
And created this code in the results page (I omitted the table formatting to
make it easier to read):
CFLOOP INDEX="Field" LIST="#Form.FieldNames#"
CFSET Val = Evaluate("Form.#Field#")
cfquery name="#field#" datasource="survey" dbtype="ODBC"
SELECT DISTINCT FIRST_NAME, LAST_NAME, CAMPUS_ADDRESS_1, OFFICE_PHONE,
EMAIL, SCHOOL, QUESTION_NAME, TOPIC_NAME
FROM FACULTY, ANSWER, QUESTION, TOPIC
WHERE
QUESTION$QUESTION_ID = QUESTION_ID
AND
FACULTY$FACULTY_ID = FACULTY_ID
AND
TOPIC$TOPIC_ID = TOPIC_ID
AND
QUESTION_ID = '#Field#' AND ANSWER = '#Val#'
/cfquery
cfoutput query="#field#" maxrows="1"
pFound b#recordcount#/b faculty members who answered quot;yesquot;
to: br
Topic: b#TOPIC_NAME#/b br
Catagory: b#QUESTION_NAME#/b/p
/cfoutput
CFOUTPUT query="#field#"
pName: b#FIRST_NAME# #LAST_NAME#/b/p
pCampus Address: #CAMPUS_ADDRESS_1#/p
pOffice Phone: #OFFICE_PHONE#/p
pE-mail: a href="mailto:#EMAIL#"#EMAIL#/a/p
pSchool: #SCHOOL#/p
/CFOUTPUT
/CFLOOP
I made a html version of the search form if anyone wants to see it.
http://hs91.ilgard.ohiou.edu/survey/search.html
I am only running the development server that comes with studio so
unfortunately no one but me can see the actual .cfm pages.
Mark and Tobe: Your right -the design is flawed. There are way to many
checkboxes for one page. There are way to many questions in this survey
altogether! This survey was originally sent out in the mail and then mailed
back in and the results were hand entered into excel -if you get my drift; I
was brought in late in the project. I may try to break it up into several
pages instead of one long one.
Thanks again,
Dan
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.