Hi all, here's an interesting question.
I have this function to returns true(1) if date=holidaydat e from tblHolidays otherwise false. It is not working..
Any hint, help, assistance on how to achieve this would be appreciated..
I have this function to returns true(1) if date=holidaydat e from tblHolidays otherwise false. It is not working..
Code:
Public Function IsHoliday(dtmDate As Date) As Boolean
Dim db As Database
Dim rs As Recordset
Dim strCriteria As String
Set db = CurrentDb
Set rs = db.OpenRecordset(tblHolidays, dbOpenSnapshot)
strCriteria = [HolidayDate] = dtmDate
rs.FindFirst strCriteria
If rs.NoMatch Then
IsHoliday = False
Else
IsHoliday = True
End If
Set rs = Nothing
Set db = Nothing
End Function
Any hint, help, assistance on how to achieve this would be appreciated..
Comment