SELECT tblFTHC.DEPT, tblFTHC.[CLOCK NBR], tblFTHC.[EMPLOYEE ID], tblFTHC.POSITION, tblFTHC.SHIFT, tblLunchPunchHistory.CLKOND, tblLunchPunchHistory.CLKOFD, Left([tblLunchPunchHistory]![CLKOND],Len([tblLunchPunchHistory]![CLKOND])-2)/24+(Right([tblLunchPunchHistory]![CLKOND],2))/(24*60) AS [CLOCK ON], IIf([tblLunchPunchHistory]![CLKOFD]>0,Left([tblLunchPunchHistory]![CLKOFD],Len([tblLunchPunchHistory]![CLKOFD])-2)/24+(Right([tblLunchPunchHistory]![CLKOFD],2))/(24*60),0) AS [CLOCK OFF], CDate(Left([tblLunchPunchHistory]![TDATED],Len([tblLunchPunchHistory]![TDATED])-4) & "/" & Mid([tblLunchPunchHistory]![TDATED],Len([tblLunchPunchHistory]![TDATED])-3,2) & "/" & Right([tblLunchPunchHistory]![TDATED],2)) AS [TRANS DATE] INTO tblADP_DC_8
FROM tblFTHC LEFT JOIN tblLunchPunchHistory ON tblFTHC.[CLOCK NBR] = tblLunchPunchHistory.EMPNOD
WHERE (((tblLunchPunchHistory.TDATED) Between 30114 And 33114))
GROUP BY tblFTHC.DEPT, tblFTHC.[CLOCK NBR], tblFTHC.[EMPLOYEE ID], tblFTHC.POSITION, tblFTHC.SHIFT, tblLunchPunchHistory.CLKOND, tblLunchPunchHistory.CLKOFD, Left([tblLunchPunchHistory]![CLKOND],Len([tblLunchPunchHistory]![CLKOND])-2)/24+(Right([tblLunchPunchHistory]![CLKOND],2))/(24*60), IIf([tblLunchPunchHistory]![CLKOFD]>0,Left([tblLunchPunchHistory]![CLKOFD],Len([tblLunchPunchHistory]![CLKOFD])-2)/24+(Right([tblLunchPunchHistory]![CLKOFD],2))/(24*60),0), CDate(Left([tblLunchPunchHistory]![TDATED],Len([tblLunchPunchHistory]![TDATED])-4) & "/" & Mid([tblLunchPunchHistory]![TDATED],Len([tblLunchPunchHistory]![TDATED])-3,2) & "/" & Right([tblLunchPunchHistory]![TDATED],2));