PC Review


Reply
Thread Tools Rate Thread

Append 2 tables with variable names

 
 
ambushsinger
Guest
Posts: n/a
 
      24th May 2010
Hi there...
Here's my problem.
I have 2 tables in an access 2000 database. The table names are
unknown...they could have any name. Through VBA how can I append one table to
the other?
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      24th May 2010
Hi,
you can run append query:

currentdb.execute "Insert into " & strTable1 & " (Field1, Field2) Select
Field1, Field2 From " & strTable2, dbfailonerror

Where strTable1 and strTable2 variables hold tables names

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"ambushsinger" <(E-Mail Removed)> wrote in message
news:9046CC5E-A9D5-4DCE-B12A-(E-Mail Removed)...
> Hi there...
> Here's my problem.
> I have 2 tables in an access 2000 database. The table names are
> unknown...they could have any name. Through VBA how can I append one table
> to
> the other?


 
Reply With Quote
 
ambushsinger
Guest
Posts: n/a
 
      25th May 2010
Thanks Alex...works perfectly!

"Alex Dybenko" wrote:

> Hi,
> you can run append query:
>
> currentdb.execute "Insert into " & strTable1 & " (Field1, Field2) Select
> Field1, Field2 From " & strTable2, dbfailonerror
>
> Where strTable1 and strTable2 variables hold tables names
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://accessblog.net
> http://www.PointLtd.com
>
>
> "ambushsinger" <(E-Mail Removed)> wrote in message
> news:9046CC5E-A9D5-4DCE-B12A-(E-Mail Removed)...
> > Hi there...
> > Here's my problem.
> > I have 2 tables in an access 2000 database. The table names are
> > unknown...they could have any name. Through VBA how can I append one table
> > to
> > the other?

>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable column names and ranges in Pivot Tables within macros. OMER Microsoft Excel Programming 3 21st Oct 2009 05:24 PM
Append variable to control name Duck Microsoft Access 4 14th Jul 2008 02:23 PM
Append [TARGETDIR] variable to system PATH variable cnathaide@yahoo.com Microsoft C# .NET 0 15th Aug 2007 07:54 PM
Append Query in VBA - to append VBA variable values to Access tabl =?Utf-8?B?QWdlbnQgRGFnbmFtaXQ=?= Microsoft Access VBA Modules 4 1st Nov 2006 04:25 PM
variable names for location of Tables ? Isis Microsoft Access Getting Started 2 21st Apr 2006 03:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:51 PM.