User inputs Table when query runs.

Listerman

Registered User.
Local time
Today, 11:00
Joined
Mar 3, 2008
Messages
19
I have a database with 96 tables.
8 tables per month
one query pulls the desired information.

My question is this, currently the query looks to all the January Tables.

Can I configure one query to request user input(month) and then the query looks to the tables based on the users input(month).
 
That explanation is pretty poor.

I am looking to have one query setup to calculate all the totals per user.
Since the totals change every month I am trying to come up with a way that when the query runs. It asks for a month, when the user inputs the month, the query will change to the input month and calculate those totals.

Everything is standardized. Every month the table has the same fields just a different name (ie. MarchCalls, MarchTickets, AprilCalls, AprilTickets).

Is this possible or do i need to create a query for each month?
 
You can do it, but it will have to be done in VBA. Why is the data in separate tables? Normalization rules would have the data in one table with a date field, which would make it simple to query for the month you need.
 
The database contains a table with users. Each table has different fields but that table exists 12 times (one for each month).
The reason we are using 12 versions of 1 table is at the end of the year we can run a yearly report on that statistics. This way each month has its own tables.
 
Not recommended. You should put it all in one table with a date field (indexed). Then you can use a parameter to identify the month and let your SQL do the filtering job for you.

What you are suggesting is a spreadsheet with multiple tabs. If a spreadsheet will work, you should use that. If it won't, you should normalize your data.
 

Users who are viewing this thread

Back
Top Bottom