Connecting to excel via Access query

J

John Acocella

I am aware that you can use the Source Database property
of a query to use a table in an external Access database.
Is there a way to use this property to connect to an Excel
spreadsheet. Trying to avoid creating a table link to
access the Excel data. Thanks.
 
D

david epsom dot com dot au

Use File, Get External Data, to create a link to the
Excel spread sheet, then in the immediate window in
the vba project, type (and press [enter])

?codedb.tabledefs("myexceltbl").connect

to get a sample of the kind of database name and
table name you need to use, to select data from
an excel spreadsheet.

(david)
 

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