reference an object in another mdb

L

LGarcia

Hi,
In my database I need to write some code that will export a table that
exists in another database to a text file. Can you reference a table in a
different database without it being linked to the one you are using? If so,
how??
Thanks!
LGarcia
 
T

Tony Toews

LGarcia said:
In my database I need to write some code that will export a table that
exists in another database to a text file. Can you reference a table in a
different database without it being linked to the one you are using? If so,
how??

Write a query using the IN clause

SELECT CustomerID
FROM Customers
IN OtherDB.mdb
WHERE CustomerID Like "A*";

or

SELECT CustomerID
FROM Customer
IN "C:\DBASE\DATA\SALES.MDB"
WHERE CustomerID Like "A*";

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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