Make table based on range

It_thug

Registered User.
Local time
Today, 07:40
Joined
Oct 22, 2009
Messages
59
In an every more frustrating attempt at something more complex than I think I can actually do with my limited knowledge, I'm trying to find ways around my lack of ability.

So..... Is there a way to set up a make table (Select into) query that can create a table the data based on a date range.

For instance, the form pulls a start date and and end date, and make table query will create data for each year in the range.

So if it is [Start_Date] as 2000 and [End_date] as 2010 it will create a table with the Report_Year row populated with 2000 2001 2002, etc...

I think if I can get that to run I can work around my other issues with this.
 
Your requirement is not clear enough but I would bet 10:1 that you have a structural problem in your tables.
Tell us more about your existing data structure and goals.
 
The requirement on this particular question is pretty much me trying to figure out a way to do what I really need to do. So there is no data structure for this question. I'm trying to determine if there is a way to populate a table (one field name) with all the years from a range.

So, the input is Start_Year and End_Year. I need the field populated automatically with all the years... so if start year is 2000, and end year is 2010, I need it to populate the field in the table with 2000, 2001, 2002, 2003....

The date range is a variable. And may change. It will not always be ten years. If I can do this, than I think I can do the rest of what I need. But I don't know how to populate the table from a range.
 
or, even better.... get it to create the field names based on the range.
 
This page covers using a crosstab query to make field names using values from a table/query.

Your fieldname source table would list all the years required.
Use a query to select the ones you want then use that result in the crosstab query as per the description at the bottom of the page.
 

Users who are viewing this thread

Back
Top Bottom