Got it. You want all the combinations of start and end date. Time to use
Dale Fye's number table again.
Create a table TblNumbers with one field intNumber
Enter the numbers 0 to 9
Create a new query (name it QryNumbers) Click on the View button and paste
in the following
(each line begins with a word in capitals so mend this if the email breaks
it up
SELECT hundreds.intNumber*100+Tens.intNumber*10+Ones.intNumber AS intNumber
FROM TblNumbers AS Hundreds, TblNumbers AS Tens, TblNumbers AS Ones
ORDER BY hundreds.intNumber*100+Tens.intNumber*10+Ones.intNumber;
You will now have a series of numbers going 1 to 1000
Step 1: Click on the (closed) QryNumbers and go to Insert Query.
Drag intNumber into this new query (QryStartDate)
In the next column type
StartDates: #01/01/2008#+[intNumber]
to generate a sequence of 1000 dates starting from 01/01/08
Filter this query so that it only shows the dates you require
Repeat the above from Step1 but this time, call the query QryEndDate and
your function will now say
QryEndDate, again, filter the query so that it shows the same series of
dates
Create yet another query.
Add both QryStartDate and QryEndDate to the grid but don't join them in any
way.
Click the downarrow next to the QueryType button
Choose Append Query
Append these dates to your table
Evi
M. Murphy said:
Sorry about being vague,
I will try again.
I have tableA which has 2 fields, StartDate, and EndDate, which both prompt
for a date.
Next, I want to create records in tableB, which are all the dates from
StartDate to EndDate.
for example, StartDate=January 1, 1980, EndDate=January 10, 1980.
I want the query to create these records in tableB: January 1, 1980,
January 2, 1980, January 3, 1980, and so on, up to January 10, 1980.
Is this a job for a query? I've spent a lot of the day trying to figure
this one out, and its eluding me!!