Re: How to create an append query that appends to more than one ta

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"RockBennett" <RockBennett@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CF825525-7E3E-45D9-AFEB-26227E5C6329@xxxxxxxxxxxxxxxx
> Thanks Allen. Is there anyway to combine multiple append querries in one
> SQL
> statement? Like a batch ...
>
> "Allen Browne" wrote:
>
>> JET can't do that.
>>
>> You need to execute multiple append queries: one for each table you wish
>> to
>> append to.
>>
>> "RockBennett" <RockBennett@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:3FDF00CF-D212-480F-B26B-A3721AB7017F@xxxxxxxxxxxxxxxx
>> > 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?


.



Relevant Pages