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.
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.
- Related Videos
- Related Articles
- Ask / Related Q&A
- Career Development Programs - Tips On Early Career Planning For Children
- Easy Content Development Program © - Read Before You Buy!
- Free Article Development Program © - it is Finally Affordable!
- Top Article Development Program © - Don't Miss This Out!
- Article Development Program © - Easily Write Original Text!
- Articles Development Program © - Stop Paying for Unique Text!
- Content Development Program © - the Amazing Facts!
- Top 10 Training Best Practices for Effective Learning and Development Programs




Create website using PHP as Scripting Language
By: Rightway Solution | 16/11/2009Eager to know who’s the brain behind this big-bang theory in the development world? He’s Rasmus Lerdorf the developer utilized the first version to run his own home page, while his collection of Practical Extraction and Report Language (Perl) code snippets created by him in 1994 were named Personal Home Page (PHP).
iPhone Web Applications for Pure Fun
By: Arun Kumar | 16/11/2009Every time Apple launches something, it releases enough gust telling consumers about its unending possibilities. With the launch of the high-end mobile cum entertainment gadget called the iPhone, Apple has proved once again what it takes to be the ruler leading the roost. The Apple iPhone is surely a gadget for the new generation. It’s a device that comes equipped with a plethora of communication as well as utility and fun features.
Packt Publishing's new 'Ext JS 3.0 Cookbook'
By: Amit Sharma | 13/11/2009Authored by Jorge Ramon, the Ext JS 3.0 Cookbook contains step-by-step recipes for building impressive rich internet applications using the Ext JS JavaScript library.
GROUP BY IN XQUERY
By: Anuj Tripathi | 13/11/2009This article will provide you to implement GROUP BY clause in XQUERY with the code.
Java Developers and the power of Java
By: jacklin | 13/11/2009Article explaining the security steps Java developers can take for JAR files while developing application with Java platform.
Sending SMS Alerts in SharePoint 2010 over Office Mobile Service Protocol (OMS)
By: Virtosoftware | 12/11/2009Finally it's possible to send SMS directly from SharePoint to mobile phones. This feature was only available in some add-on components before.
Forbidding the Clipboard for the specified process
By: Apriorit Inc. | 11/11/2009Though the Clipboard is one of the fundamental parts of the Windows operating system, there is little information about how it works, especially in the low level. In this article, I’m going to tell you something about the Clipboard internals by showing how you can forbid access to it.
How to save money from fixing computer?
By: janson | 11/11/2009Are you familiar with these problems in your computer below? Mysterious errors, crashes and restarts Sluggish internet and download speeds Trouble loading songs, movies and programs Do you tire of frequently bothering friends for help, or worse, paying a professional to fix your computer? Like a car, without regular maintenance computers begin to accumulate errors that cause slowdowns, crashes and even potential system failure.
Database Design Basics by Nicholas Brown
By: Nicholas Brown | 21/10/2008 | DatabasesTips 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 ServiceTips 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 | DatabasesTips 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 | ProgrammingSave time and money by adding comments to your source code.
Increasing Small Business Productivity by Nicholas Brown
By: Nicholas Brown | 27/09/2008 | Small BusinessTips and tricks to help maximize business profits by increasing project efficiency and organization.
Importing External Access Database Tables Using Visual Basic by Nicholas Brown
By: Nicholas Brown | 18/09/2008 | ProgrammingA brief how-to on importing external database tables using Visual Basic code. This tool can help users to automate their databases, saving time and money.
Becoming an Expert Ms Access Database Programmer
By: Nicholas Brown | 11/09/2008 | ProgrammingTips 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.