Generate dates within range

bobfin

Registered User.
Local time
Today, 00:28
Joined
Mar 29, 2002
Messages
82
I have a table that has a single record with 2 fields: Start-Date and End-Date. I want to generate all the dates that fall within that date range and put them in another table that just has a single date field. How do I make those dates? I'm using Access 2003 and Windows XP.
 
Generate dates

Customers can have activity on some dates in the range but not on others. Different customers will have activity on different dates. When they do have activity, I need several kinds of totals for the particular customer-date combo. So I created an empty table with fields for customer, date and the various kinds of totals. Then I append records covering all combos of customer and date. Then I update the totals fields wherever there is activity.
 
Date generation method

One solution: Make a form based on the table that needs the dates. Records can be written to the table by opening this form, doing a SetValue from a macro that updates the textbox bound to the date field, then closing the form. Multiple records can be written by doing these steps in a macro that is run from another macro which specifies something in the Repeat Count parameter. No VBA necessary with this method.
 

Users who are viewing this thread

Back
Top Bottom