Free Online Articles Directory
18.11.2008 Sign In Register Hello Guest
Email:
Password:
Remember Me 
forgot your password?


Importing External Access Database Tables Using Visual Basic by Nicholas Brown

Author: Nicholas Brown Author Ranking Blue | Posted: 18-09-2008 | Comments: 0 | Views: 214 | Rating:  (257) Article Popularity - Blue (?) Got a Question? Ask.
Sign Up Now!

Sometimes a Microsoft Access database user may find it desirable to automate the process of importing tables from an external Access database file into their current database. Below is a segment of code that provides an example of how to accomplish this.

 

‘*******CODE*******

Dim root As String

Dim srcDB As database

Dim tdf As TableDef

Dim x As Integer

 

Root = “C:”

Set srcDB = OpenDatabase(root)

For Each tdf In srcDB.TableDefs

x = 0

If (tdf.Name = "CULVERT") Then

DoCmd.TransferDatabase acImport, "Microsoft Access", root, acTable, "CULVERT", "CULVERT"

errorCheck = 1

End If

Next tdf

 

‘******************

 

After the variable declarations, the first line of code sets the variable “root” equal to “C:” which is the location of the external database holding the tables we wish to import. The next line sets our database variable equal to the external database. The next lines of code search through the external database to find the table named “CULVERT.” If this table is found, the table is imported using the DoCmd function. The “acImport” variable simply tells the function that we wish to import information from the database. “Microsoft Access” specifies the type of database containing the table. Following that is the folder location (“root”) of the external database. The variable actable specifies that the object we wish to import is a table. The next two strings contain the table name to import and the name to assign to the imported table when it is imported into the current database. It should be noted that if the table named to be imported already exists in the current database, MS Access will automatically rename the table being imported.

 

Once the desired tables have been imported, they can be utilized just like any of the other tables in the database.

 

Rate this Article: Current: 0 / 5 stars - 0 vote(s).

Article Source: http://www.articlesbase.com/programming-articles/importing-external-access-database-tables-using-visual-basic-by-nicholas-brown-566986.html

Print this Article Print article   Email to a Friend Send to friend   Publish this Article on your Website Publish this Article   Send Author Feedback Author feedback  
About the Author:

Nicholas Brown is a recognized authority on the subject of Access Databases. He is the founder of Database Technology Services (DTS). DTS is a leader in custom Access database development. DTS programmers create databases for corporations, small businesses and individuals. Visit www.dts-consultants.com to see all of the services DTS has to offer.

Submitting articles has become one of the most popular means to drive traffic to your website and promote yourself and your business. Join us today - It's Free!

Article Comments

Comment on this article Comment on this article
Your Name
Your Email:
Comment Body
Enter Validation Code: Captcha


Related Articles

Product Delivery: Think Like the Customer by Nicholas Brown
By: Nicholas Brown | 15/10/2008 | Customer Service
Tips and tricks on delivering a product or service that meets all of the needs of your client.

Database Design Basics by Nicholas Brown
By: Nicholas Brown | 21/10/2008 | Databases
Tips and tricks on designing and implementing a database that can handle everything you demand.

Querying Table Data Using Visual Basic Code in Ms Access
By: Nicholas Brown | 11/09/2008 | Databases
A brief how-to on creating temporary recordsets using Visual Basic (VB) and Standard Query Language (SQL). With this tool, users can create faster, more efficient databases that take up less room on the computer.

Becoming an Expert Ms Access Database Programmer
By: Nicholas Brown | 11/09/2008 | Programming
Tips and tricks on becoming your own Access database expert. Follow these guidelines and you will be well on your way to becoming a leader in database development.

Pulling Data From Multiple Tables Into a Single Query in Ms Access by Nicholas Brown
By: Nicholas Brown | 17/09/2008 | Databases
A brief how-to on linking multiple tables within a single query. With this tool, users can develop more complex queries, reducing the need for several queries. This will also reduce the size of the database making it more efficient and easier to navigate.

Using Comments in Your Programming Source Code by Nicholas Brown
By: Nicholas Brown | 30/09/2008 | Programming
Save time and money by adding comments to your source code.

Increasing Small Business Productivity by Nicholas Brown
By: Nicholas Brown | 27/09/2008 | Small Business
Tips and tricks to help maximize business profits by increasing project efficiency and organization.

Ms Access Databases Don't Have to Look Unprofessional by Nicholas Brown
By: Nicholas Brown | 30/09/2008 | Databases
Tips and tricks to help maximize the usability of your database by improving the user interface.

Got a Question? Ask.

Ask the community a question about this article:

Frequently Asked Questions

Database programmer
By: Ryan | 17-10-2008
what is it like being a database programmer?

Wher was LaBonge before
By: Norman Moore | 17-10-2008
Where was "El Kabong" while the planse were being made and the project was announced?

Dubai design center: question from italy
By: Carmelo Minauda | 16-10-2008
I'd like to know if the DUBAI DESIGN CENTER, is still underconstruction or they stopped the projects for others. This is an important question for me, because i'd like to make a thesis of my degree in Italy. I't very important project and I can promote it with Italian company of design that want to invest in the gulf. Thanks Carmelo Minauda

How to form a Christian Showcase?
By: Algenor | 05-10-2008
How to form a Christian Showcase?

I have a ceiling fan over the area for my pool ...
By: Patbrett | 05-10-2008
I have a ceiling fan over the area for my pool table that I need to keep. What type of lighting fixture would you recommend for the fan?

I have a ceiling fan over the area for my pool ...
By: Patbrett | 05-10-2008
I have a ceiling fan over the area for my pool table that I would like to keep. What type of lighting fixture for the fan would you recommend?

Q&A Powered by:
Powered by Yedda 

Latest Programming Articles

Cool Desktop Wallpapers
By: Danny | 18/11/2008
Cool desktop wallpaper is accomplishments arrangement that displayed in the computer operating system. The wallpapers usually be acclimated in JPEG, BMP and GIF book formats. That wallpaper can be acclimated with Microsoft Windows, Linux and Macintosh Mac OS. Each adviser can be altered requirements, alike admitting wallpaper images advised for accepted monitors can be scaled up or bottomward to the fit size. Those are accessible on the internet for free. Some categories of wallpapers are a

Tips for Buying Software Online
By: Daniel Jowssey | 17/11/2008
Buying software online not only helps save the planet, it also has other benefits, including: * Ease and Simplicity. You can purchase software in your underwear at 4am if you really want to. Shopping online doesn’t have to be done within regular business hours, nor do you need to look your best to do it. It’s also easy to shop around for the best prices and takes less time than driving to the shops.

Mvc Design Pattern
By: TuVinhSoft .,JSC | 14/11/2008
Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (View) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface.

Advantages of Low Cost Contract Programmers in Freelance Programming
By: Joanna Gadel | 12/11/2008
It observed that web industry is getting tougher thus the necessity of freelance contract programmer is required for developing more effective website with flexible features. This article states the fruitful advantages of freelance programmers in contract programming.

A Guide to Cnc Kits
By: Martin Applebaum | 09/11/2008
CNC kits are a way in which to construct your CNC machine. This article will provide some information on these machines.

A Guide to Cnc Tube Bending Machines
By: Martin Applebaum | 08/11/2008
Are you familiar with a CNC tube bending machine? This article will shed some light on the main function and components of this machine.

Ways to Hire Dedicated Php Programmers
By: Jucick | 08/11/2008
It’s not at all easy to hire dedicated PHP programmers unless you know where and how to find them. Whether you need to fix, update or enhance your website you naturally want the job done quick and right.

Top 4 Reasons Why Addressing Web Accessibility is Important
By: Matt Cave | 05/11/2008
There are very high chances that web accessibility is more important to the performance of your web site than you realize. Article takes a look at the top 4 reasons why it would be important to address the issue of web accessibility.

More from Nicholas Brown

Database Design Basics by Nicholas Brown
By: Nicholas Brown | 21/10/2008 | Databases
Tips and tricks on designing and implementing a database that can handle everything you demand.

Product Delivery: Think Like the Customer by Nicholas Brown
By: Nicholas Brown | 15/10/2008 | Customer Service
Tips and tricks on delivering a product or service that meets all of the needs of your client.

Ms Access Databases Don't Have to Look Unprofessional by Nicholas Brown
By: Nicholas Brown | 30/09/2008 | Databases
Tips and tricks to help maximize the usability of your database by improving the user interface.

Using Comments in Your Programming Source Code by Nicholas Brown
By: Nicholas Brown | 30/09/2008 | Programming
Save time and money by adding comments to your source code.

Increasing Small Business Productivity by Nicholas Brown
By: Nicholas Brown | 27/09/2008 | Small Business
Tips and tricks to help maximize business profits by increasing project efficiency and organization.

Pulling Data From Multiple Tables Into a Single Query in Ms Access by Nicholas Brown
By: Nicholas Brown | 17/09/2008 | Databases
A brief how-to on linking multiple tables within a single query. With this tool, users can develop more complex queries, reducing the need for several queries. This will also reduce the size of the database making it more efficient and easier to navigate.

Becoming an Expert Ms Access Database Programmer
By: Nicholas Brown | 11/09/2008 | Programming
Tips and tricks on becoming your own Access database expert. Follow these guidelines and you will be well on your way to becoming a leader in database development.

Querying Table Data Using Visual Basic Code in Ms Access
By: Nicholas Brown | 11/09/2008 | Databases
A brief how-to on creating temporary recordsets using Visual Basic (VB) and Standard Query Language (SQL). With this tool, users can create faster, more efficient databases that take up less room on the computer.

Article Categories





Give Feedback

Sign up for our email newsletter

Receive updates, enter your email below