Hi All,
Trying to find a VBA solution to the following and think I need to use DAO but not sure how to.
I have a table that has a daily summary of transactions (sas.summary) including date, transaction reference and transaction type.
I also have a table for each transaction type (approx 250 tables with names like sas.x001) that has the transaction reference, status, comments .
What I want to do is loop through the summary recordset using the transaction reference (TRANS_REF) as the criteria and the transaction type (TRANS_TYPE) to determine which table it need to search in. I want to put all the data from the summary table (DATE, USER, TRANS_REF and TRANS_TYPE) and the found results (STATUS and COMMENTS) from the transaction tables, in to a table called tbl_master.
I'm guessing I would need to create a reference table with a column for the transaction reference and the table it relates to.
Any help you can provide will be appreciated as the only way I can think of doing it with my limited knowledge involves chaining about 500 sql queries together
Trying to find a VBA solution to the following and think I need to use DAO but not sure how to.
I have a table that has a daily summary of transactions (sas.summary) including date, transaction reference and transaction type.
I also have a table for each transaction type (approx 250 tables with names like sas.x001) that has the transaction reference, status, comments .
What I want to do is loop through the summary recordset using the transaction reference (TRANS_REF) as the criteria and the transaction type (TRANS_TYPE) to determine which table it need to search in. I want to put all the data from the summary table (DATE, USER, TRANS_REF and TRANS_TYPE) and the found results (STATUS and COMMENTS) from the transaction tables, in to a table called tbl_master.
I'm guessing I would need to create a reference table with a column for the transaction reference and the table it relates to.
Any help you can provide will be appreciated as the only way I can think of doing it with my limited knowledge involves chaining about 500 sql queries together