Thomas,
It depends on what you're trying to do here, as to what the most appropriate approach might be. Here are a couple of pointers:
(a) The SQL for a simple table append is:
[tt]
INSERT INTO tblDestination
SELECT *
FROM tblSource;
[/tt]
This will copy all records from the tblSource table to the tblDestination table.
(b) Use this technique to append as many tables as you like to the tblDestination table. For example, you could have three queries, defined as follows:
qryDelete:
[tt]
DELETE *
FROM tblDestination
[/tt]
qryAppend1:
[tt]
INSERT INTO tblDestination
SELECT *
FROM tblSource1;
[/tt]
qryAppend2:
[tt]
INSERT INTO tblDestination
SELECT *
FROM tblSource2;
[/tt]
These three queries could be respectively defined in the query window, then run in order, to achieve theend result of appending tblSource1 and tblSource2.
(c) In VBA code, the above process could be fully automated, with the option of coding the SQL into the procedure, without having to define the queries as separate query objects. Let us know if you need more details on doing this.
(d) Finally, if you just wish to append two transaction tables to each other for regular reporting purposes, without the requirement to retain the merged tables, you might consider the use of the SQL UNION operator. This effectively allows two (or more) tables to be "unioned" in a single SQL statement. This generally takes the form:
[tt]
SELECT *
FROM tblSource1
UNION
SELECT *
FROM tblSource2
[/tt]
Select Field lists, Order by and criteria can also be applied as required.
Hope this helps,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)