Hello, im trying to do a simple search/filtering based on a time range. Each record has a StartTime and EndTime (Short Date field). I want the result of the search to be inclusive. ie. the searchable time range should be inside in the actual time range of a record.
i have tried several codes like:
(txt_StartTime etc are the unbound text boxes values in the search form...
Dim sql as String
If Me.txt_StartTime.Value <> "" AND Me.txt_EndTime.Value <> "" Then
sql = sql & " AND (StartTime >= " & Me.txt_StartTime.Value & ") AND (EndTime <= " & Me.txt_EndTime.Value & ")"
...ive tried it with #StartTime#...but doesnt work either...
Any suggestions for the code please? Thank you in advance for any help!! Vas
i have tried several codes like:
(txt_StartTime etc are the unbound text boxes values in the search form...
Dim sql as String
If Me.txt_StartTime.Value <> "" AND Me.txt_EndTime.Value <> "" Then
sql = sql & " AND (StartTime >= " & Me.txt_StartTime.Value & ") AND (EndTime <= " & Me.txt_EndTime.Value & ")"
...ive tried it with #StartTime#...but doesnt work either...
Any suggestions for the code please? Thank you in advance for any help!! Vas