Filters

B

barry

Can anyone give me a code that will filter data by date range. The user needs
to be able to free type the date range. (Ex. 11/03/06 - 12/20/2006)
 
J

John Vinson

Can anyone give me a code that will filter data by date range. The user needs
to be able to free type the date range. (Ex. 11/03/06 - 12/20/2006)

BETWEEN [Enter start date:] AND [Enter end date:]

or, to cover the possibility that the date field contains a time
component,
= Format(CDate([Enter start date:]), "yyyy-mmm-dd") AND < Format(DateAdd("d", 1, CDate([Enter end date:])), "yyyy-mm-dd")

John W. Vinson[MVP]
 
Top