I am having an error when this filter is applied:
For some reason it works fine when I apply it directly from the filter tool on the Ribbon but when I try to use it in VBA it highlight "ww" as an error. Does anyone know why?
Thanks
Code:
Private Sub ThisWeekFilter_Click()
Me.Filter = "(Year(ProjectScheduleT.DateStart)=Year(Date()) And DatePart("ww",ProjectScheduleT.DateStart,0)=DatePart("ww",Date(),0))"
Me.FilterOn = True
Thanks
Comment