G
Guest
I'd like to assign table1's values to table2. Table1 has 3 fields and table2
have 4 fields. Table2 is empty. The example of these 2 tables as following,
tbl1([ItemName], [Quantity], [PricePerItem])
tbl2([ItemName], [Quantity], [PricePerItem], [TotalPrice])
I use recordsets and manipulate fields in the first table to yield the new
value in the 2nd table, i.e, to calculate [TotalPrice], I create a function
and call it from the main program. But I don't know how to open both
recordsets at the same time and get data from each row of tbl1, call the
function, get [TotalPrice], and insert those values into recordset2 and go to
the next row of tbl1, insert data into the corresponding row in tbl2, and so
on until EOF.
Can you show me how to do that?
Thank you, Tim
have 4 fields. Table2 is empty. The example of these 2 tables as following,
tbl1([ItemName], [Quantity], [PricePerItem])
tbl2([ItemName], [Quantity], [PricePerItem], [TotalPrice])
I use recordsets and manipulate fields in the first table to yield the new
value in the 2nd table, i.e, to calculate [TotalPrice], I create a function
and call it from the main program. But I don't know how to open both
recordsets at the same time and get data from each row of tbl1, call the
function, get [TotalPrice], and insert those values into recordset2 and go to
the next row of tbl1, insert data into the corresponding row in tbl2, and so
on until EOF.
Can you show me how to do that?
Thank you, Tim