Need table of all dates between two other dates as input to another query

  • Thread starter Thread starter Benjamin White
  • Start date Start date
B

Benjamin White

I have been googling just for this one, supposedly simple task for most of
the evening. Is there any relatively simple way of doing this? I need the
table to contain all the dates between two specified in a form, not just
ones already in an existing table.

Thanks, Nibjib
 
I have been googling just for this one, supposedly simple task for most of
the evening. Is there any relatively simple way of doing this? I need the
table to contain all the dates between two specified in a form, not just
ones already in an existing table.

Thanks, Nibjib

I'd suggest just creating a table with 20 years of dates (it's easy to
use Excel to "fill down" starting with the first date you'll need, and
fill down as many rows as you like). This spreadsheet can then be
imported into Access.

A Query on this table with criteria

[datefield] >= CDate([Forms]![yourform]![datefrom]) AND [datefield] <=
CDate([Forms]![yourform]![dateto])

will give you all dates in the range, and the table is relatively tiny
(7305 rows).
 
Back
Top