You can use the BETWEEN function with dates:
sql = "SELECT * FROM table WHERE dateColumn >= #" startDate & "#
and dateColumn <= #" & endDate & "#"
But instead of text boxes (startDate, endDate) I would use drop down menus with either pre-defined dates or dates that you are pulling from the database, otherwise you might run into the problem of date formatting.
|