I\'m using an Access database and trying to load a DataTable object but am receiving the subjected error. My query calls a public function named \'CountWeekDays\' within a stand
User-defined VBA functions can be used in Access queries only when the query is run from within Access itself. If you will be running the query from within a .NET application then the query will have to return just the start/end dates and your .NET code will have to calculate the number of weekdays between them.