Clarification

  • Thread starter Thread starter Arthur
  • Start date Start date
A

Arthur

....I know how to do an append query to "merge" the data
into one table after I've got both tables in the same
Access file. But I'm wondering if there is a way to avoid
this second step by appending the data to the existing
table as the import occurs.

Art
 
You could write VBA code to make a DAO or ADO connection to your external data and go into a while loop - loop through all external records. Inside the while loop, do an insert into your table for each incoming record

Scott Shearer MCSD, MCBD
(e-mail address removed)
----- Arthur wrote: ----

....I know how to do an append query to "merge" the data
into one table after I've got both tables in the same
Access file. But I'm wondering if there is a way to avoid
this second step by appending the data to the existing
table as the import occurs

Ar
 
Hi Art,

Sometimes it's practical to use an append query that gets its data from
the external table. The general syntax is

INSERT INTO target [(field1[, field2[, ...]])]
SELECT [source.]field1[, field2[, ...]
FROM tableexpression IN externaldatabase;

The Help can be quite hard to find. In recent versions, try selecting
Help|Microsoft Access Help in the main Access window; then look in the
Contents pane for "Microsoft Jet SQL Reference", then "data manipulation
language", then "INSERT..INTO". That should take you to an article about
Append queries, with a See Also section that has links to articles on
the FROM and IN clauses.
 
Back
Top