H
hellboy_ga
I have a database that stores plant capacity information (tblCapacity)
and region sales information (tblSales). The Table that stores plant
capacity info includes the following fields; regionCode, plantCode,
recordedYear and plantCapacity. The table that stores the sales in the
region includes fields such as regionCode, recordedYear and Sales.
I have created a program using VB that copy the data from last year and
put it in the same table under current year and this program works for
both of these tables. The program runs a query and make a table of old
year data, run another query on that new table and change the old year
to current year, then it runs another append query to put the new
table's data into the original table (tblCapacity or tblSales). This
program works for both tables even though they contain different number
of columns.
However I want the program to increase the last year data (only year
dependent fields - plantCapacity and Sales) by a certain percentage
(that is picked by the user) and then paste it back to the current
table. How would I make a common program that can increase the year
dependent data by a certain percentage that can work for both tables?
This is because the number of tables may change so the program has to
be flexible. It is complicated and hard to describe so please ask for
any clarification.
Thanks in advance, any help is appreciated.
and region sales information (tblSales). The Table that stores plant
capacity info includes the following fields; regionCode, plantCode,
recordedYear and plantCapacity. The table that stores the sales in the
region includes fields such as regionCode, recordedYear and Sales.
I have created a program using VB that copy the data from last year and
put it in the same table under current year and this program works for
both of these tables. The program runs a query and make a table of old
year data, run another query on that new table and change the old year
to current year, then it runs another append query to put the new
table's data into the original table (tblCapacity or tblSales). This
program works for both tables even though they contain different number
of columns.
However I want the program to increase the last year data (only year
dependent fields - plantCapacity and Sales) by a certain percentage
(that is picked by the user) and then paste it back to the current
table. How would I make a common program that can increase the year
dependent data by a certain percentage that can work for both tables?
This is because the number of tables may change so the program has to
be flexible. It is complicated and hard to describe so please ask for
any clarification.
Thanks in advance, any help is appreciated.