G
Guest
my function looks is as follows... How do I use that funtion in a query?
Public Function Holidays(BeginDate As Date, EndDate As Date) As Integer
Holidays = DCount("*", "Holiday", "HdyDate Between " & _
Format$(BeginDate, "\#mm\/dd\/yyyy\#") & _
" And " & Format$(EndDate, "\#mm\/dd\/yyyy\#") & _
" And Weekday(HdyDate, 1) <> 1 " & " And Weekday(HdyDate, 1) <> 7 ")
End Function
Public Function Holidays(BeginDate As Date, EndDate As Date) As Integer
Holidays = DCount("*", "Holiday", "HdyDate Between " & _
Format$(BeginDate, "\#mm\/dd\/yyyy\#") & _
" And " & Format$(EndDate, "\#mm\/dd\/yyyy\#") & _
" And Weekday(HdyDate, 1) <> 1 " & " And Weekday(HdyDate, 1) <> 7 ")
End Function