Hello Everyone,
Access 2010. This is my first post here so pardon my lingo lol.
I am new to Access VBA and have only used query design and built-in functions. But after reading some posts on this site, I understand that I need to build a custom function in a module and am having some difficulty getting sample codes to run. Also, when I test any sample codes in the Immediate Window I keep getting the error "Compile Error: Expected: line number or label or statement or end of statement".
I need a function to calculate the number of weekdays in a given date range (Mon-Fri only) and am not concerned with holidays at all. However, I do need to use the Date() arguement within the function. Similar to the networkdays function in Excel, I could enter =networkdays(10/17/2013,Date()) so it would calculate 3 businsess days. Of course in Access the "Start date" would be a field we call [Date_Last_Updated] so the formula would be more like
=networkdays([Date_Last_Updated,Date()) so I can calculate the # of days since an item was last updated to today's date.
Any help is GREATLY appreciated!