need to generate a range of dates

C

carrie

I would like to build a query that will generate a list
of all dates within a range, using a form to enter the
start date and end date. The dates would then be used in
a crosstable query to generate a calendar that i would
output to excel. Any thoughts?
 
T

Tom Ellison

Dear Carrie:

Put a long list of dates into a table and filter that table by the
date range.

You can automate the entry of dates into the table:

INSERT ManyDates
SELECT MAX(MyDates) + 1 FROM ManyDates

Add the first date to the table. Every time you run the above it will
add the next date. Put it in a loop and execute it a few thousand
times. You sould be done in a minute.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top