Hi, I want to write a sub to duplicate a record in any table, i.e., the only parameters are the table name and sql criteria like so: DuplicateFunc(strTableName As String, strSQLCriteria As String). I've started by using "INSERT INTO" statements but that requires knowing the number of fields of the table whose record you want to duplicate.
I want to provide a quick duplication method for the user across a number of tables. (This is because we have a system that logs both invoices and transactions so the two can be checked against each other to identify outstanding settlements, and a duplication system allows us to log transactions quickly when they exactly match the original invoice). I have a few more tables in similar situations, so I need a duplication function that works for any table so I don't have to write a new "INSERT INTO" statement for each table to account for their different fields.
Thanks very much.
I want to provide a quick duplication method for the user across a number of tables. (This is because we have a system that logs both invoices and transactions so the two can be checked against each other to identify outstanding settlements, and a duplication system allows us to log transactions quickly when they exactly match the original invoice). I have a few more tables in similar situations, so I need a duplication function that works for any table so I don't have to write a new "INSERT INTO" statement for each table to account for their different fields.
Thanks very much.