How to create an append query that appends to more than one table?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create an append query that adds a group of records from one or more
tables to the end of one or more tables?
 
JET can't do that.

You need to execute multiple append queries: one for each table you wish to
append to.
 
Query tab, "New," "OK," add desired tables and fields, click Query Type
button, select "Append Query."

That's about as much as we can do given the info that you provided.
Please remember, YOU can see your database; WE cannot. We have no idea
what your database looks like, what your table names & fields are, or
what you're trying to accomplish with them...for example, why you're
trying to store data redundantly. Post back with details and someone
will try to help.

Good luck,

LeAnne
 
To add to the other knowledgeable replies, you can't really add records to
the end of a table. Beginning and end of a database table have no meaning. If
you put records into a table there is no guarantee that they will display in
that order any time that you open up the table in the future. Unless you have
a field to sort on when using a query, you just don't know what record is
first and last. Tables only store data like a bucket of water. Which drop is
the first; which drop is last?
 
Thanks Allen. Is there anyway to combine multiple append querries in one SQL
statement? Like a batch ...
 
Thanks Jerry. As you say they do not add to the end which is okay in my
situation. I am only trying to add the record(s) to the table.
 
No. There is no batch.

You could write some VBA code that executes a series of SQL statements.
Something like this:
Dim db As DAO.Database
Dim strSql As String
Set db = dbEngine(0)(0)

strSql = "INSERT ..."
db.Execute strSql, dbFailOnError

strSql = "INSERT ..."
db.Execute strSql, dbFailOnError

'etc.
 
Back
Top