I jumped the gun on posting. Here is what I should have posted.
Create a table with consecutive numbers zero through the maximum number of
days to fill. Then the two queries from the SQL below.
SELECT tblInventory.InvDate, DateSerial(Year([Enter start
date]),Month([Enter start date]),Day([Enter start date])) AS Start,
DateSerial(Year([Enter end date]),Month([Enter end date]),Day([Enter end
date])) AS [End]
FROM tblInventory
WHERE (((tblInventory.InvDate) Between [Enter start date] And [Enter end
date]));
SELECT [Start]+[Count] AS [Interval Date], Query33.Start, Query33.End
FROM [Count], Query33
WHERE (((Count.Count)<=DateDiff("d",[Start],[End])))
GROUP BY [Start]+[Count], Query33.Start, Query33.End;
Ernst Guckel said:
Create a table with consecutive numbers zero through the maximum number of
days to fill. Create a query with your table and the count table not joined.
Ok... tblCount has 32 records from 0 to 31.
SELECT YourTable.Start, YourTable.End, [start]+[Count] AS [Interval Date]
FROM YourTable, [Count]
WHERE (((Count.Count)<=DateDiff("d",[start],[end])));
Actually there is only one field... [InvDate] has records between two
dates... There is no [Start] AND [Stop] not quite sure how to fix this...
Ernst.
:
Hey,
I have a query that looks up data in 'tblInventory' and returns
information that is between a date range. IE 'Between #7/1/05# AND
#7/31/05#. The problem is that there is not always data for each date in the
range. I am looking for a way to have the query return ALL dates in the
range.
Any ideas?
Thanks,
Ernst.