Had to set date format by putting "Const strJetDate = "\#mm\/dd\/yyyy\#" in the header section of the code and then altered the code as follows. Now works like a charm.
Code:
Private Sub coDaysCalc_Click()
On Error GoTo Err_coDaysCalc_Click
Dim intCount, intPublic As Integer
Dim tbHolidays As DAO.Database
Dim rst As DAO.Recordset
Dim strLookDate As String
Set tbHolidays = CurrentDb
Set rst = tbHolidays.OpenRecordset("SELECT [HolidayDate] FROM tbHolidays", dbOpenDynaset)
'strStartDate = strStartDate + 1
'To count StartDate as the 1st day comment out the line above
intCount = 0
intPublic = 0
strLookDate = Format(strStartDate, strJetDate)
Do While strStartDate <= strEndDate
rst.FindFirst "[HolidayDate] = " & strLookDate & ""
If rst.NoMatch Then
intCount = intCount + 1
Else
intPublic = intPublic + 1
End If
strStartDate = strStartDate + 1
strLookDate = Format(strStartDate, strJetDate)
Loop
Exit_coDaysCalc_Click:
txDaysApplied = intCount - txRDO
txPublic = intPublic
rst.Close
Set rst = Nothing
Set tbHolidays = Nothing
Exit Sub
Err_coDaysCalc_Click:
MsgBox Err.Description
Resume Exit_coDaysCalc_Click
End Sub
Sorry can't seem to get the code to indent properly here to make it easier to read.