View Full Version : Adding data to table each month


Mike Hughes
02-22-2008, 04:23 PM
I want to have a query that I run at the end of each Month to track a workers production and to store that data in a table for each worker by month. Can this be done?

Something like

Worker Jan Feb Mar
Mike 45 33 95
Sue 125 44 02

If this can be done could someone explain to me how to do this. I don't even know if a table can be used to keep stats over months and years.

Thanks for any help you can give

David Eagar
02-22-2008, 05:04 PM
Yes it can, but the question is: Do you need to? As long as you are storing the data to do the calculation, you should just be running queries to display the calculation

Mike375
02-22-2008, 05:15 PM
If you can make the query...then you can have the table

Rabbie
02-22-2008, 10:55 PM
If you can make the query...then you can have the table

Conversely If you can make the query ... you don't need to make the tables. As a general principal there is no need to store data that you can create in a simple manner.

Mike Hughes
02-23-2008, 02:58 AM
Let me explain this again.

At the end of each month I want to run a query to capture information for a point in time (last day of the month). The data is changing daily so I can't go back and get this data later. I want a table that will allow me to store this data from each month so that I may do a report each month showing the comparison of the data between months over a time period. Sorry to sound so stupid, BUT I AM.

David Eagar
02-23-2008, 05:27 AM
As long as this data is already being stored in a table as

Worker eDate Event
Mike 01/02/08 5
Mike 04/02/08 7
etc

To get what you want


Worker Jan Feb Mar
Mike 45 33 95
Sue 125 44 02


You just need a query Worker, Month(eDate), Event and group by sum, you should not need to store the results of this query in another table, your data is already there, just not in the form you wish to see it

Rich
02-23-2008, 05:30 AM
Use a crosstab query to get the records displayed the way you appear to want it

Mike375
02-25-2008, 04:18 PM
Let me explain this again.

At the end of each month I want to run a query to capture information for a point in time (last day of the month). The data is changing daily so I can't go back and get this data later. I want a table that will allow me to store this data from each month so that I may do a report each month showing the comparison of the data between months over a time period. Sorry to sound so stupid, BUT I AM.

I am not sure if your problem is display of the data or retrieving the data. If display, see Rich's post above.

If you want to "archive" data then an Append query to a table will do it for you.