'If the item type is checkboxes or options buttons (the two types that support the "other" option), find out
'whether or not an "other" option is being used so an extra column can be added.
If CStr(rsQuestions("item_type_id")) = CStr(SUR_ITEM_MULTISELECT_CHECKBOXES) Or CStr(rsQuestions("item_type_id")) = CStr(SUR_ITEM_SINGLE_SELECT_OPTIONS) Then
strOtherYN = rsQuestions("other_yn")
End If
'Advanced the recordset
rsQuestions.MoveNext
'Check to see whether or not an "other" item should be added to the list of headers
ElseIf CStr(lngItemTypeID) = CStr(SUR_ITEM_OPEN_ENDED_ONE_LINE) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_OPEN_ENDED_COMMENTS_BOX) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_DATE) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_NUMBER) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_DATABASE_DROPDOWN) Then
If rsExport("ResponseAnswerText") = SUR_ANSWER_TEXT_NULL Then
ElseIf CStr(lngItemTypeID) = CStr(SUR_ITEM_CONSTANT_SUM) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_RANKING) Or CStr(lngItemTypeID) = CStr(SUR_ITEM_OPEN_ENDED_ONE_OR_MORE_LINES) Then
If rsExport("ResponseAnswerText") = SUR_ANSWER_TEXT_NULL Then
Response.Write ","""""
rsExport.MoveNext
Else
'If the current answer matches, display the text
If CStr(lngSubItemID) = CStr(rsExport("subitem_id")) Then