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.