Solved Item cannot be found in the collection corresponding to the request.....

can you check each Fieldname if they are correct?
also better to Cast your date to EN(US) format:

...UPDATE JobInfoT SET Lead_Date = #" & Format(AddOrderDays(GetDays("Lead_Date")),"mm/dd/yyyy") & "#,.......
 
OK, "AddDays" is a function and one of its most common arguments, GetDays, is ALSO a function. You supplied them both in an earlier post, so I took a quick scan but didn't see anything obvious. Doesn't prove anything because some days I can't see doodlum squat. Side effect of having a mild touch of macular degeneration.

More significantly, you are executing the functions in SQL context so detailed error reporting is going to be limited. All that CAN be called out by Access is the db.Execute because everything that happens in SQL occurs in the separate memory & context of the ACE engine. So in essence, the data flow is that Access passes the SQL to ACE, which barfs - but doesn't have visibility of the individual lines of code, so all it can do is return an error number. The only thing that Access saw was that passing this SQL caused this error - which it reports.

If this function is executed in the Access GUI, you might get a more specifically directed error. As a contrived test, run some code to somehow call AddDays using GetDays in some event code (strictly for debugging purposes). I.e. fake out a call to the AddDays and GetDays functions so that you can see what comes back from the call in Access GUI context. Don't test it using SQL context. IF there is an error in either of these items when called from Access's GUI/VB context, the error trap might be more specific and call out the line that actually is failing somewhere in the subroutine.

If that doesn't help, then I'm definitely clueless.
Ok,
Thank you.
Ill see if i can work that out.
Ill keep you in the loop.
 
To reiterate what @theDBguy pointed out, those dates will fail in SQL. It does not matter where you live or what your regional settings are dates have to be in MM/DD/YYYY or some other non-ambiguous format.
 
Morning everyone.
Believe it not I found the issue.
It was a simple naming convention that didn't match the table. :(
Didn't change anything with the dates, its putting dates in now..

thank you for all your input, appreciate it.
 
Morning everyone.
Believe it not I found the issue.
It was a simple naming convention that didn't match the table. :(
Didn't change anything with the dates, its putting dates in now..

thank you for all your input, appreciate it.
Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom