Insert INTO SQL with File Dialog

xdenama

Registered User.
Local time
Today, 07:23
Joined
Dec 4, 2015
Messages
26
Hi there, how to choose a Table from difference ms access file to append data with File Dialog? This is my current APPEND QUIRIES

INSERT INTO F15 ( SERVICE, YEAR, DUTY) IN 'D:\NS\Labv1.accdb'
SELECT F13.SERVICE, F13.YEAR, F13.DUTY
FROM F13;
 
link (attach) the external table into yours. It will show as a normal table.
then run a normal append query.
 
link (attach) the external table into yours. It will show as a normal table.
then run a normal append query.

Actually I want choose different file when I run the query. I want to use file dialog to choose the file from different location.
 
Hi,

You can use below query to do such job. Let us know if this works for you.

Run this to update your selected database:
INSERT INTO [MS Access;DATABASE=" & YourSelectedDatabasePathGoesHere & ";].[F15] ( SERVICE, YEAR, DUTY)
SELECT F13.SERVICE, F13.YEAR, F13.DUTY
FROM F13;

Run this to update your current database:
INSERT INTO [F15] ( SERVICE, YEAR, DUTY)
SELECT SERVICE, YEAR, DUTY
FROM [MS Access;DATABASE=" & YourSelectedDatabasePathGoesHere & ";].[F13];
 

Users who are viewing this thread

Back
Top Bottom