Do While Not objRec.EOF
Dim tn
For j=0 To Ubound(Arr)
txtg=CInt(objRec.Fields("pers_no").value)
tn=Arr(j,1)
txtg1=CInt(tn)
If StrComp(txtg,txtg1,0) Then
If Arr(j,4) = "C/Out" Then
var = ""
TableEMP(j,0)=Arr(j,1)
TableEMP(j,1)=objRec.Fields("name").value
TableEMP(j,2)=objRec.Fields("com_code").value
TableEMP(j,3)=objRec.Fields("shift_code").value
TableEMP(j,4)=Arr(j,2)
TableEMP(j,5)="C/Out"
TableEMP(j,6)=Arr(j,3)
TableEMP(j,7)=var
TableEMP(j,8)=var
TableEMP(j,9)=var
Else
DWS = objRec.Fields("shift_code").value
Response.write j&" "&Arr(j,1)&" "&objRec.Fields("pers_no").value&" "&txtg1&" "&objRec.Fields("name").value&"<br>"
Call Calculatetime(DWS,Arr(j,3),Arr(j+1,3),Arr(j,2),Arr(j+1,2),j)
End If
End If
Next
objRec.MoveNext
Loop