Hi eagle1wi
Thanx for your reply! Here is my code.Its is a big one. Please have a patience to look at this. I think the problem is in the Loop.
<CFIF Group IS "Staff">
<CFSET RTable = "StaffRegTable">
<CFSET Code = "Spec_Code">
<CFELSE>
<CFSET RTable = "RegTable">
<CFSET Code = "Spec_code">
</cfif>
<CFIF Departure IS "Y">
<CFSET Time_in_first_half=#Cookie.First#>
<CFSET Time_out_second_half=#Cookie.Second#>
</CFIF>
<HTML><HEAD>
<TITLE><CFOUTPUT>#Group#</CFOUTPUT> Attendence Submitted</TITLE>
<CFINCLUDE TEMPLATE="shortheaders-light.cfm">
</HEAD>
<BODY>
<div align="center"><img src="resources/dcflag.gif" alt="" border="0"></div>
<CFIF Group IS NOT "Staff">
<CFSET Time = "Time_in_first_half">
<CFELSE>
<CFSET Time = "Hours">
</CFIF>
<CFSET AttendanceArray=ArrayNew(2)>
<CFSET ListsArray=ArrayNew(1)>
<CFSET ListsArray[1]="Spec_Code">
<CFSet ListsArray[2]="Time_in_first_half">
<CFSET ListsLength=ArrayLen(ListsArray)>
<CFIF Departure IS "N">
<CFSET List="Spec_code, #Time#">
<CFELSE>
<CFSET List="Spec_code, Time_in_first_half, Time_out_second_half">
</CFIF>
<CFSET incount=1>
<CFLOOP INDEX="innercounter" LIST="#List#">
<CFSET loopcount=1>
<CFLOOP INDEX="outercounter" LIST="#Evaluate("#innercounter#"

#">
<CFSET AttendanceArray[#incount#][#loopcount#] = "#outercounter#">
<CFIF innercounter IS "Spec_code">
<CFSET PresentVar = "Present#Evaluate("#outercounter#"

#">
<CFSET PresVar = "Present#Evaluate("#outercounter#"

#">
<CFIF NOT Evaluate("ParameterExists(#PresVar#)"

>
<CFSET AttendanceArray[#incount#+2][#loopcount#] = "N">
<CFELSE>
<CFSET AttendanceArray[#incount#+2][#loopcount#] = Evaluate("Present#outercounter#"

>
</CFIF>
</CFIF>
<CFSET loopcount = #loopcount#+1>
</CFLOOP>
<CFSET incount = #incount#+1>
</CFLOOP>
<CFSET temp=ArrayLen(AttendanceArray)>
<CFSET temp2=ArrayLen(AttendanceArray[temp])>
<CFSET insertCount = 0>
<CFSET Time_out="12:00 AM">
<CFSET Time_in_2nd="12:00 AM">
<CFSET Time_out_2nd="12:00 AM">
<CFOUTPUT>
<CFSET String_Date=#DateFormat(Now(), "mm/dd/yy"

#>
</CFOUTPUT>
<TABLE width="70%" ALIGN="CENTER">
<CFOUTPUT>
<CFSET loopcount=1>
<CFLOOP FROM="1" TO="#ArrayLen(AttendanceArray[temp])#" INDEX="OuterCounter">
<TR>
<CFLOOP INDEX="InnerCounter" FROM="1" TO="#temp#">
</CFLOOP>
</TR>
<CFIF AttendanceArray[3][outercounter] IS "Y">
<CFQUERY NAME="Attendcheck" DATASOURCE="DC_Schools">
SELECT *
FROM dbo.Daily_Rec, dbo.#RTable#
WHERE dbo.Daily_Rec.String_Date = '#DateFormat(Now(),"mm/dd/yy"

#' AND dbo.Daily_Rec.Spec_code = dbo.#RTable#.#Code#
</CFQUERY>
<CFLOOP QUERY="Attendcheck">
<CFIF AttendanceArray[1][outercounter] IS #Attendcheck.Spec_code#>
<TR><TD ALIGN="CENTER"><BR>Attendance for #Attendcheck.First_Name# #Attendcheck.Last_Name# has already been recorded. Please click the Back or Previous button on your browser and try again.</TD></TR>
<CFABORT>
</CFIF>
</CFLOOP>
<CFQUERY NAME="DailyAttendance" DATASOURCE="DC_Schools">
INSERT INTO dbo.Daily_Rec (<CFIF Group IS NOT "Staff">Time_in_first_half<CFELSE>Hours, Time_in_first_half</CFIF>, Spec_code, Time_Out_First_half, Time_out_second_half, Time_in_second_half, String_Date)
VALUES ('#AttendanceArray[2][outercounter]#', <CFIF Group IS "Staff">'12:00 AM', </CFIF>'#AttendanceArray[1][outercounter]#', '#Time_out#', '#Time_out_2nd#', '#Time_in_2nd#', '#String_Date#')
</CFQUERY>
<!--- Catch the Database Exception and Errors--->
<CFSET insertCount=#insertCount#+1>
<CFELSE>
<CFIF Departure IS "Y">
<CFQUERY name="DailyDeparture" datasource="DC_Schools">
UPDATE Daily_Rec
SET <!---Time_in_first_half='#AttendanceArray[2][outercounter]#',---> Time_out_second_half='#AttendanceArray[3][outercounter]#'
WHERE Spec_Code='#AttendanceArray[1][outercounter]#' AND String_Date='#DateFormat(Now(), "mm/dd/yy"

#'
</cfquery>
<CFSET insertCount=#insertCount#+1>
</CFIF>
</CFIF>
</CFLOOP>
</CFOUTPUT>
</TABLE>
<CFSET AttendanceList=ArrayNew(2)>
<CFSET loopcount=1>
<cfloop index="Spec_codeList" list="#Spec_code#">
<CFSET AttendanceList[loopcount][loopcount]=#Spec_codeList#>
<cfloop INDEX="TimeIn" LIST="#Time#">
<CFSET AttendanceList[loopcount][loopcount+1]=#TimeIn#>
</CFLOOP>
<CFOUTPUT>
<CFSET PresentVar = "Present#Spec_codeList#">
<CFSET PresVar = "Present#Spec_codeList#">
<CFIF NOT Evaluate("ParameterExists(#PresVar#)"

>
<CFSET Present = "N">
<CFELSE>
<CFSET Present = Evaluate("Present#Spec_codeList#"

>
</CFIF>
</cfoutput>
<CFSET loopcount=#loopcount#+1>
</cfloop>
<BR>
<div align="center"><FONT size="+1"><B>Attendance was successfully recorded for <CFOUTPUT>#insertCount# #Group#</CFOUTPUT><CFIF insertcount GT 1>s</cfif> </B></FONT></div><br><br><br>
<BR>
<div align="center"><a href="DCPSAttendMenu.cfm"><font size="+1" color="Red">Return to Attendance Menu</font></a></div>
</BODY></HTML>
Thanx
micjohnson