Hi:
I have the following code written:
Do Until rs.EOF
If strUID = rs("UID" Then
If Week1Start <= rs("dtsDate" <= Week1End Then
MakeDedupedArray Time_WeekA, rs("TimeCodeID", rs("dblHours"
Debug.Print "UID="; strUID
Debug.Print "dtsDate="; rs("dtsDate", "TimeCode="; rs("TimeCodeID", "dblHours="; rs("dblHours"
Debug.Print "rs="; rs("UID"
rs.MoveNext
ElseIf Week2Start <= rs("dtsDate" <= Week2End Then
Debug.Print "Week2"
MakeDedupedArray Time_WeekB, rs("TimeCodeID", rs("dblHours"
rs.MoveNext
Else
Debug.Print "Will do OT Calc"
OT_Calc Tot
'Append
End If
Else
'restart for new UID
End If
Loop
rs.Close
Set rs = Nothing
This code works good for week1 but the code does not pust it out to week 2.
Also When the strUID changes to a different UID I need it to go through and do the same thing again until it gets to the end of the recordset.
Thanks
Z
I have the following code written:
Do Until rs.EOF
If strUID = rs("UID" Then
If Week1Start <= rs("dtsDate" <= Week1End Then
MakeDedupedArray Time_WeekA, rs("TimeCodeID", rs("dblHours"
Debug.Print "UID="; strUID
Debug.Print "dtsDate="; rs("dtsDate", "TimeCode="; rs("TimeCodeID", "dblHours="; rs("dblHours"
Debug.Print "rs="; rs("UID"
rs.MoveNext
ElseIf Week2Start <= rs("dtsDate" <= Week2End Then
Debug.Print "Week2"
MakeDedupedArray Time_WeekB, rs("TimeCodeID", rs("dblHours"
rs.MoveNext
Else
Debug.Print "Will do OT Calc"
OT_Calc Tot
'Append
End If
Else
'restart for new UID
End If
Loop
rs.Close
Set rs = Nothing
This code works good for week1 but the code does not pust it out to week 2.
Also When the strUID changes to a different UID I need it to go through and do the same thing again until it gets to the end of the recordset.
Thanks
Z