Query an external database...

D

DIOS

I finally solved this problem! My error was when I posted my SQL
statement I rewrote some of the field names, as Im sure most of us do
to retain some level of security. Anyway, it turns out one of my field
names was "Group" and since that is a SQL reserved word I had to write
the syntax very carefully.

If i repost my original SQL statement with the actual field names then
it looks like so:

INSERT INTO tblEmployees (FullName, Group)
SELECT EmplName, Group FROM
tblEmployees IN 'D:\Datafile\old.mdb';

It bombs becuase it reads the 'Group' field name as the reserved word
GROUP. So i changed it to:

INSERT INTO tblEmployees (FullName, [Group])
SELECT EmplName, [Group] FROM
tblEmployees IN 'D:\Datafile\old.mdb';

and that works rather well. Again this is done to import records from
a table in an external Access97 database into an Access2000 database
via VBA.

AGP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top