I get the "Invalid Use of Null" error, but I don't understand where the null is comming from. The BeginDate and Enddate evaluate to valid dates.
Public Function Test(BeginDate As Date, EndDate As Date)
Dim BusDays As Integer
BusDays = DSum("[BusinessCalendar!BType]", "BusinessCalendar", "BusinessCalendar!BDate between " & BeginDate & " and " & EndDate)
Public Function Test(BeginDate As Date, EndDate As Date)
Dim BusDays As Integer
BusDays = DSum("[BusinessCalendar!BType]", "BusinessCalendar", "BusinessCalendar!BDate between " & BeginDate & " and " & EndDate)