Solved Item cannot be found in the collection corresponding to the request..... (1 Viewer)

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:33
Joined
May 7, 2009
Messages
19,169
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") & "#,.......
 

Chief

Registered User.
Local time
Today, 14:33
Joined
Feb 22, 2012
Messages
156
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.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 17:33
Joined
May 21, 2018
Messages
8,463
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.
 

Chief

Registered User.
Local time
Today, 14:33
Joined
Feb 22, 2012
Messages
156
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.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:33
Joined
Oct 29, 2018
Messages
21,358
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

Top Bottom