Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2004, 11:29 AM
Authorized User
 
Join Date: Apr 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appending 15 tables in Access2000 using VBA

Hello,
I need to append 15 tables into 1 using vba (Access2000).
I know that I have to open a recordset for all the tables. What next ?
Any help would be appreciated.
 
Old April 14th, 2004, 06:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any particular reason you have to use VBA and recordsets?
Couldn't this be done with a simple INSERT statement?
such as:
Code:
INSERT INTO Table1 ( Field1, Field2 )
SELECT Field1, Field2
FROM Table2;
Or, if you want to do it in one big query..
Code:
INSERT INTO Table1 (Field1, Field2)
SELECT Field1, Field2 From Table2
UNION
SELECT Field1, Field2 From Table3
.........
UNION
SELECT Field1, Field2 From TableN
Steven


I am a loud man with a very large hat. This means I am in charge
 
Old April 14th, 2004, 08:53 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Or you could create an append query and change the source table as you go.



Sal





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for Pivot Tables stealthdevil Excel VBA 3 March 21st, 2007 04:01 PM
Appending new nodes inside tables in IE 6 stephen_c_ Javascript How-To 1 January 26th, 2005 05:06 AM
Access2000 Linking Tables Rchanga Access 1 December 21st, 2004 05:49 PM
Link Tables thru VBA Rchanga Access 1 November 20th, 2004 11:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.