Insert INTO SQL with File Dialog (1 Viewer)

xdenama

Registered User.
Local time
Today, 02:10
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;
 

Ranman256

Well-known member
Local time
Today, 05:10
Joined
Apr 9, 2015
Messages
4,337
link (attach) the external table into yours. It will show as a normal table.
then run a normal append query.
 

xdenama

Registered User.
Local time
Today, 02:10
Joined
Dec 4, 2015
Messages
26
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.
 

almahmood

Registered User.
Local time
Today, 14:40
Joined
Mar 28, 2017
Messages
47
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

Top Bottom