Linked Tables

R

Robert

Hello:

I am creating an application in Access to track records
of our 1500 or so members. We have created two
databases, one to store data and the other for the GUI.
The tables in the database for data is being linked in
the GUI database.

When the solution is complete, we plan to package it
using the Access 2003 Developer Extensions. The problem
is that the extensions do not seem to allow us to place
the application in a custom folder (C:\OALodgeData).
With the linked tables, we need an absolute reference to
the database with data.

Is it possible to link tables using shell references, for
example to a subdirectory under the user's program files
folder? Alternatively, is it possible to specify a
custom directory when packaging with the Access 2003
Developer Extensions?

Thanks for your help,

Robert
 
A

Allen Browne

Linked tables require an absolute path.

If the data will always be in the same folder w.r.t. the application, you
could parse the path from CurrentDb().Name, and reassign the Connect
property of each TableDef when your application starts up. Don't forget to
RefreshLinks. There is an example at:
http://allenbrowne.com/ser-13.html

If the data might be somewhere else (such as on a server, with the front-end
on each workstation), one solution is to pop up the File Open dialog so the
user can locate the data file. Set the Connect property of each TableDef,
and the setting will be retained. If they ever move the data file or change
the path/server name, the user will be prompted to locate the data again.

The API calls you need for the File Open dialog are here:
http://www.mvps.org/access/api/api0001.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