This query works fine outside of the CFFILE tag but generates an error when placed within the cffile (and within cfloop needed to generate the excel file) - any assistance would be appreciated
QUERY/OUTPUT: <cfquery name=interests2 dbtype=query> SELECT interest_id, interest FROM member_profile WHERE member_profile.yp_id=#QueryName.yp_id# </cfquery> <cfset str=""> <cfloop query=interests2> <cfset str=str & <BR> & #interests2.interest#> #interest#<br> </cfloop> ERROR WHEN WITHIN CFFILE/CFLOOP "Element INTEREST is undefined in INTERESTS2" code when using CFFILE: <cfquery name="Query76" dbtype="query"> SELECT distinct yp_id FROM member_profile order by lname </cfquery> <cfloop query="Query76"> <cffile action="APPEND" file="D:\inetpub\wwwroot\chamber\admin\yp\temp_excel\email_report_intere sts.xls" output=" <tr> <td> <cfquery name=interests2 dbtype=query> SELECT interest_id, interest FROM member_profile WHERE member_profile.yp_id=#QueryName.yp_id# </cfquery> <cfset str=""> <cfloop query=interests2> <cfset str=str & <BR> & #interests2.interest#> #interest#<br> </cfloop> </td> </tr> " addnewline="yes"> </cfloop> </cfoutput> Tim Laureska 1st-String Technologies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234404 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54