zepphead80
Programmer
Good morning:
I am attempting to use the DSum aggregate function in a VB module that is part of my Access database. The line of code looks like this:
In this, getNumberOfWeekdays is a function that I defined elsewhere in the module as such:
However, when I run the application, it stops at the DSum function and raises an error saying Undefined function getNumberOfWeekdays in expression. The Access help pages say that this argument in DSum can take an expression that contains a user defined function, so I'm not sure what's going on.
Any insight would be GREATLY appreciated. Thank you...
I am attempting to use the DSum aggregate function in a VB module that is part of my Access database. The line of code looks like this:
Code:
Me!txtLostDaysNoPaySeasonal = DSum("getNumberOfWeekdays([tblWC]![fldDateOfNoPayBegin], [tblWC]![fldDateReturned])", "qryTest", "[tblEmployees]![fldPayDistCode] = 'BK21312'")
In this, getNumberOfWeekdays is a function that I defined elsewhere in the module as such:
Code:
Function getNumberOfWeekdays(dteStartDate As Date, dteEndDate As Date) As Integer
* * *
(Code to determine number of weekdays between two dates)
* * *
End Function
However, when I run the application, it stops at the DSum function and raises an error saying Undefined function getNumberOfWeekdays in expression. The Access help pages say that this argument in DSum can take an expression that contains a user defined function, so I'm not sure what's going on.
Any insight would be GREATLY appreciated. Thank you...