I have a function with the following SQL string that is not executing properly in the module... I can pull back the proper results with a query but when i try to properly translate it in my SQL string in the module...
I keep getting various errors....
Can someone look at this and tell me how it should be syntacticly?
Thanks
Ron
Set cnn = CurrentProject.Connection
Set rs = New ADODB.RecordSet
strSQL = "SELECT COUNT(tbl_Holidays.HoliName) AS cntHoliday FROM tbl_Holidays " _
& " WHERE (tbl_Holidays.Holidate) Between " _
& " #iStartDate# " AND "#iEndDate#" & ""
rs.Open strSQL, cnn, adopenStatic
totHolidays = cntHoliday
lngRecs = rs.Fields(0)
intWkDays = intWkDays = lngRecs