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
Solved

How to MakeTable to another database?

Posted on 2013-01-06
2
226 Views
Last Modified: 2013-01-08
Hello - I need to run MakeTable queries in a split-database front end that makes the tables in the back end.

I see the DestConnectStr/DB/Table properties in the Query Design property sheet, but where are these prop's if I want to set them in VBA, and run the query via a QueryDef .Execute?

Thanks
0
Comment
Question by:mlagrange
2 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 500 total points
ID: 38748912
You can use this syntax:
Dim SQL As String
SQL = "SELECT * INTO [MS Access;Database=C:\Database.mdb].Table1 FROM Table1;"
CurrentDb.Execute SQL, dbFailOnError

Open in new window

0
 

Author Closing Comment

by:mlagrange
ID: 38755624
Thank you!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

765 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