Solved

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
This article will show you how to use shortcut menus in the Access run-time environment.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now