Appending tables

davesmith202

Employee of Access World
Local time
Today, 04:32
Joined
Jul 20, 2001
Messages
522
I need some code to append 3 tables together. What is the easiest way to do this? Do I create the SQL by creating an append query first? Or should I use recordsets?

Thanks,

Dave
 
Queries... possibly a union query...

Why merge that data? The data must be in seperate tables for some reason?
 
I can't use a union query because I understand the data is not updatable. Yes, it has to be in 3 seperate tables to start with.
 
Yes a union query is not updatable, but you can use a union query to insert everything into one table.

Also Union querys work wonders for reporting and stuff.
 
Ahh, I just created 3 Append Queries, ready for a sequential append. Is that the best way to do it? Or create one Union query and then use that to insert into one table?
 
3 seperate appends or one append with a union... doesnt make a difference, but for number of queries called.
 
I'm sort of thinking one make table query(if the original data tables are not updateable) and two append queries?
 
Ok, I have made 3 append queries where tables 1,2 and 3 are appended to table 4. What code would I need to run these in sequence?
 
Got an error!

Currentdb.execute "Query1"

Is Currrentdb something I have to declair?
 
Error was due to something else. Sorted! Thanks for your help.
 
Noos oot ekops :p

Yes "Spoke too soon" appearently, tho maybe more readable as "noos oot ekopS" or "ekopS oot noos" :eek:

LOL

Currentdb.execute is not something you have to declare, it should (always) be readily available.

If there is an error it may be relating to the Append queries...
Try running the queries one at a time by hand see if you get an error that way...
 

Users who are viewing this thread

Back
Top Bottom