Attaching excel tables

V

Vincent

Hello everyone,

In my application, I have some external excel worksheets that are
attached (linked) to my database and they work very well.

I have set up the links as "path\filename.xls" (where path is the
directorory containing both the .mdb application and the excel files)
and everythings works fine except if I try to move my application to
another directory.

In this case, the path does not link directly to the excel files that
are in the same directory as the .mdb but to the former one.

I have tried to use the path ".\filename.mdb" but it is not accepted
by Access.

Does anyone have a solution to my problem?

Access 2000 on Windows 2000
 
A

Adrian Jansen

You can use Application.path to get the current path to the mdb within code,
and reset the path to your excel file based on that.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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