Solved

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

Posted on 2013-01-23
2
180 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
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

790 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