=() HELP! I am pulling out my hair trying to get this to work! I have set this up to display a daily schedule and it works great until I try to make it look decent. Here's the scenario I have a daily schedule list with all of the available times printed on the left these are pulled from the loop and the matching daily events print next to them. Ok that works fine but as soon as I add some visual formatting like images and tables I get repeated loops. I know that cfoutput goes through the loop for every record but how do I format around this and make this work and also make the code clean? Any pointer in this is mucho appreciated! Here is the code in its current state: <!--- DISPLAY TIME LOOP START ---> <CFSET StartTime1 = CreateTime(06, 00, 00)> <CFSET TeeTime = #DateAdd('N', -8, StartTime1)#> <CFLOOP index="TodaysTeeTime" from="1" to="92"> <CFSET TeeTime = #DateAdd('N', 8, TeeTime)#> <!--- DAILY SCHEDULE DISPLAY OUTPUT ---> <CFOUTPUT QUERY="DailyEvents" GROUP="BookedTeeTime"> <CFIF #TimeFormat(TeeTime)# IS #TimeFormat(BookedTeeTime)#> <CFIF Players EQ 4> <CFSET CheckImage = "#checkIMG#"> <CFSET TableBookColor = "#fourclr#"> <CFELSEIF Players EQ 3> <CFSET CheckImage = "#checkIMG#"> <CFSET TableBookColor = "#threclr#"> <CFELSEIF Players EQ 2> <CFSET CheckImage = "#checkIMG#"> <CFSET TableBookColor = "#twoclr#"> </CFIF> <CFSET Contact = "#ContactFirstName# #ContactLastName#"> <CFSET Player = "#Players#"> <CFSET EMail_1 = "<a href=mailto:#EmailAddress#>"> <CFSET EMail_2 = "#EmailAddress#"> <CFSET Ph = "#Phone#"> <CFSET BookColor = "White"> <CFELSE> <CFSET Contact = "--"> <CFSET Player = "--"> <CFSET EMail_1 = ''> <CFSET EMail_2 = "--"> <CFSET Ph = "--"> <CFSET CheckImage = "#blankIMG#"> <CFSET BookColor = "Black"> <CFSET TableBookColor = "White"> </CFIF> <tr bgcolor="<CFOUTPUT>#TableBookColor#</CFOUTPUT>"> <td bgcolor="White"><IMG SRC="../images/<CFOUTPUT>#CheckImage#</CFOUTPUT>" WIDTH=10 HEIGHT=10 BORDER=0 ALT=""></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="<CFOUTPUT>#BookColor#</CFOUTPUT>"> <CFOUTPUT><B>#TimeFormat(TeeTime, 'H:MM TT')#</B></CFOUTPUT> </td> <CFIF #DailyEvents.RecordCount# GT 0> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="<CFOUTPUT>#BookColor#</CFOUTPUT>"> <b> <CFOUTPUT>#Contact#</CFOUTPUT> </b></FONT></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="<CFOUTPUT>#BookColor#</CFOUTPUT>"> <b> <CFOUTPUT>#Player#</CFOUTPUT> </b></FONT></td> <td align="CENTER"> <CFOUTPUT> #Email_1#</CFOUTPUT><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="<CFOUTPUT>#BookColor#</CFOUTPUT>"> <b><CFOUTPUT>#Email_2#</CFOUTPUT></b></font></a> </td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="<CFOUTPUT>#BookColor#</CFOUTPUT>"> <b> <CFOUTPUT>#Ph#</CFOUTPUT> </b></font></td> </CFIF> </CFOUTPUT> <!--- PRINT THIS IF NOTHING IS SCHEDULED ---> <CFIF #DailyEvents.RecordCount# EQ 0> <tr> <td bgcolor="White"><IMG SRC="../images/<CFOUTPUT>#blankIMG#</CFOUTPUT>" WIDTH=10 HEIGHT=10 BORDER=0 ALT=""></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="000000"> <CFOUTPUT><B>#TimeFormat(TeeTime, 'h:mm tt')#</B></CFOUTPUT> </td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="000000">--</FONT></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="000000">--</FONT></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="000000">--</FONT></td> <td align="CENTER"><FONT FACE="Arial, Helvetica, san-serif" size=-2 COLOR="000000">--</FONT></td> </CFIF> </tr> </CFLOOP> <!--- DISPLAY TIME LOOP END ---> ------------------------------------------------------------------------------ Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.