Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Period Column Names/Lookup

Status
Not open for further replies.

rxcomber

Programmer
Sep 2, 2002
2
US
Hi,
I have a small Access database which has 3 tables with column names called 'Jul-02','Aug-02'....'Dec-07' holding finanical data for those periods. I also have a Periods table which holds period names and a table which includes the current month's name.
I would like to be able to dynamically create a query which would only select data from those columns which come under a date range e.g. the next 48 months and for this query to change each month, so for example, this month it selects 'Aug-02' to 'Jul-06' from the tables, next month it selects 'Sep-02' to 'Aug-06' and so on. Is this possible in Access?
Thanks,
Rory
 
If you had your data in one table this would be a snap, and indeed this is what you must do first.
Create a new table add your periods Aug-02 to this new table also add a field named period, in this field have your append query enter the value Aug02 continue this opperation until you have all your Period tables in one table.
From here on you will be able to get the information you want.
Rgds Herman
 
Why do you have your data in three tables?
What kind of a result are you looking for: data listing, or summary data on the queried columns, or both?
How many columns in each of your three tables?
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top