Invalid Procedure Call

SherriKilgore

Registered User.
Local time
Yesterday, 20:42
Joined
May 4, 2012
Messages
19
I have been running this query for several weeks with no issues. Today I am getting an error "Invalid Procedure Call". Does anyone know how to resolve this?
 
Please post the query, your function is most likely running into issues with some new (bad?) data.
 
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));
 
You are probably correct about the bad data, I am having to import data from many different sources for this. How can I trouble shoot to know if this is indeed the data itself?
 
Thank you so much, it is definately bad data. I have an identical query with a different data source and that query is working fine.
 
The format of the data is most likely not consistant with what you have been dealing with so far and breaks one of the functions. However, you are chopping up, recombining, using these for calculations to a point where I do not know where to start to troubleshoot. Maybe someone with more experience can give you more guidance.
 
Thank you for your help, I have resolved the issue. There was one record corrupt in the data.:)
 

Users who are viewing this thread

Back
Top Bottom