D
Douglas J. Steele
What's the code you're trying to use? It should be something like:
Me.Filter = "DateField Between #" & Me.Start_Date & "# And #" & Me.End_Date
& "#"
Me.FilterOn = True
(replace DateField with the appropriate field name)
Now, Start_Date and End_Date must be in mm/dd/yyyy format, regardless of
what your regional settings are. (That's not strictly true: it can be any
unambiguous format, such as yyyy-mm-dd or dd mmm yyyy. The point is, it
won't work if the date's in dd/mm/yyyy format and dd is 12 or less) To
ensure it's done properly, I'd advise using the following instead of what
I've shown above:
Me.Filter = "DateField Between " & Format(Me.Start_Date, "\#mm\/dd\/yyyy\#")
& "And " & Format(Me.End_Date, "\#mm\/dd\/yyyy\#")
Me.Filter = "DateField Between #" & Me.Start_Date & "# And #" & Me.End_Date
& "#"
Me.FilterOn = True
(replace DateField with the appropriate field name)
Now, Start_Date and End_Date must be in mm/dd/yyyy format, regardless of
what your regional settings are. (That's not strictly true: it can be any
unambiguous format, such as yyyy-mm-dd or dd mmm yyyy. The point is, it
won't work if the date's in dd/mm/yyyy format and dd is 12 or less) To
ensure it's done properly, I'd advise using the following instead of what
I've shown above:
Me.Filter = "DateField Between " & Format(Me.Start_Date, "\#mm\/dd\/yyyy\#")
& "And " & Format(Me.End_Date, "\#mm\/dd\/yyyy\#")