Solved

How to automate MS Access program to import data from different database?

Posted on 2013-01-23
2
186 Views
Last Modified: 2013-12-12
I am not a vb expert so I need your help in solving this. Please see attached word document and MS Access program for requirement. MS Access version is 2010.
Summary-of-the-requirement.docx
PGMCONSOLE.accdb
0
Comment
Question by:josyp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38811956
http://www.accessmvp.com/DJSteele/DSNLessLinks.html

The link above shows how to store and retrieve connection information, and how to create DAO table links.

Once you've done this, you can then "import" data from those linked tables like this:

Currentdb.Execute "SELECT * INTO MyLocalTable FROM MyLinkedTable"

Note that "MyLocalTable" cannot exist. If it does, you'll get an error, so if you need to remove the table first,  run this:

Currentdb.Execute "DROP TABLE MyLocalTable"

Then run the SELECT INTO statement.
0
 

Author Comment

by:josyp
ID: 38813130
Let me go through and will get back to you , thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
EXCEL Name Matching 13 42
auto-fill field(s) in Access data entry form 17 44
Launch Outlook minimized 6 29
Excel Formula to Iterate 4 11
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question