L
laurentc via AccessMonster.com
Hi.
My issue is a little hard to explain, but I will try to.
I have several tables that are based on the same structure (I know that it is
BAD in MS Access to do so, but the amount of data is too huge to avoid this
issue, as far as I know).
So my data tables are like this:
TableA : Date/Price of Product A (and other information)
TableB : Date/Price of Product B (and other information)
and so on.
The table can have as many as 10 000 rows.
I have several thousands of 'data tables' built like this, and my access
database uses some of this huge amount of data depending on the users' needs.
Here is the issue:
- the user click on the tables on which he want to make calculations: this is
done by a listbox which loops the tables names.
- only the tables names selected by the users are in the table: "tblSelected"
There can be as less as 1 name, or as much as 100 -or even more.
Let's say the user ask for the Product A, B, and D.
- I want to build a loop in VBA that will follow the selected table names
and
+ add the "price" of the a, B and D product in another table, for all the
dates available (the dates are not the same on each products)
+ these prices would be "well placed", that is to say that the date of the
prices would be the good ones.
+ the results would be placed in another table, named "TblSelectedPrices"
Do you know i can do this?
Thanks in advance.
Laurent
My issue is a little hard to explain, but I will try to.
I have several tables that are based on the same structure (I know that it is
BAD in MS Access to do so, but the amount of data is too huge to avoid this
issue, as far as I know).
So my data tables are like this:
TableA : Date/Price of Product A (and other information)
TableB : Date/Price of Product B (and other information)
and so on.
The table can have as many as 10 000 rows.
I have several thousands of 'data tables' built like this, and my access
database uses some of this huge amount of data depending on the users' needs.
Here is the issue:
- the user click on the tables on which he want to make calculations: this is
done by a listbox which loops the tables names.
- only the tables names selected by the users are in the table: "tblSelected"
There can be as less as 1 name, or as much as 100 -or even more.
Let's say the user ask for the Product A, B, and D.
- I want to build a loop in VBA that will follow the selected table names
and
+ add the "price" of the a, B and D product in another table, for all the
dates available (the dates are not the same on each products)
+ these prices would be "well placed", that is to say that the date of the
prices would be the good ones.
+ the results would be placed in another table, named "TblSelectedPrices"
Do you know i can do this?
Thanks in advance.
Laurent