Hey guys!
So I have this form where I want to filter data by a date. At this point, I don't really care if entries at exactly this date, after or before the date are displayed. I just want it to work.
The code however works when I filter by other fields which are strings or numbers, it's just about the "filter =" line.
The entity "Baustellenstart" is of the type date/time and has the format short date which should correlate with the date entered (either as 1.1.2011 or 01.01.2011 which both make 01.01.2011 when converted to date by the CDate() function)
So I always get a run-time error 3075: syntax error in date in query expression but have absolutely no clue why.
I'd be desperately grateful for suggestions!
Thanks in advance!
-jera-
So I have this form where I want to filter data by a date. At this point, I don't really care if entries at exactly this date, after or before the date are displayed. I just want it to work.
Code:
Dim filter As String
If Text27.Value <> "" Then
filter = "[Baustellenstart] = #" & CDate(Text27.Value) & "#"
End If
Me.filter = filter
Me.FilterOn = True
The entity "Baustellenstart" is of the type date/time and has the format short date which should correlate with the date entered (either as 1.1.2011 or 01.01.2011 which both make 01.01.2011 when converted to date by the CDate() function)
So I always get a run-time error 3075: syntax error in date in query expression but have absolutely no clue why.
I'd be desperately grateful for suggestions!
Thanks in advance!
-jera-