Originally Posted by
pbaldy
It is a mistake to make queries for each time period you want to query. Also, what are you going to do when you have two years worth of data?. Your combo doesn't allow for year. You want to create what's called a parameter query. It would rely on form controls or some other method to dynamically change the data it retrieved. In that event, you would base the subform on it and simply requery the subform when the combo updates. The easiest method would be to have two textboxes for a date range, and your query criteria would look like:
Between Forms!MainForm.txtFromDate And Forms!MainForm.txtToDate
presuming the two textboxes were named txtFromDate and txtToDate.