Is it possible to link tables with a relaive path?

  • Thread starter Thread starter Robin Chapple
  • Start date Start date
R

Robin Chapple

I have a club database with a FrontEnd/BackEnd configuration.

The links are complete paths:

C:\Databases\MyClub\Members.mdb

for instance.

I need to ship for look up use by others. Is it possible to make the
paths relative so that if the two files are in the same folder the
rest of the path does not matter?

Thanks,

Robin Chapple
 
Robin said:
I have a club database with a FrontEnd/BackEnd configuration.

The links are complete paths:

C:\Databases\MyClub\Members.mdb

for instance.

I need to ship for look up use by others. Is it possible to make the
paths relative so that if the two files are in the same folder the
rest of the path does not matter?

Thanks,

Robin Chapple

No but it is possible to run code at startup that recreates the links each time
and that code can look for the back end file in whatever folder the front end
file happens to be sitting in.
 
No but it is possible to run code at startup that recreates the links each time
and that code can look for the back end file in whatever folder the front end
file happens to be sitting in.

In that case is it possible to write the code to look in the same
folder as the front end without knowing the name of the folder? Where
do I find the code?

Thanks,

Robin Chapple
 
In A2K0 and later

CurrentProject.Path

will give you the directory of the FE database.
 
I've been lurking about on this thread, I have the same 'question', but with
one wrinkle. I need to 'link' to a backend database (*.mdb), but make SURE
the tables are 'read only'. I have done this in the past by establishing
the link, then hiding the table and showing the data through a snapshot
query. However, my users are now smart enough to 'unhide' the table and try
to edit via the tables! (since I'm not allowed to install 'a life and limb
removal tool' on their keyboard. Is there a way to link the tables via code
and have them be really hidden and read only? (I can do this with ODBC, but
Access won't let me link to another Access Database via ODBC :(.


(a hint to the code would be appreciated)

Thanks,

Ed Warren
 
If you can set the NTFS permissions on the BE (and the users can't), then
set it to Read-Only for the users and they won't be able to modify /add data
to the BE Tables.

Of course, the user can copy the BE to his / her local machine and much
around with the data but your "master" copy will be secured.

--
HTH
Van T. Dinh
MVP (Access)
 
(sorry, Send button hit too early)

Another option is to implement Access security that allows the users to read
the data only and not insert / edit or delete the data. However, this will
take much more time than the NTFS permissions on the BE.

--
HTH
Van T. Dinh
MVP (Access)
 
Thanks, Not exactly what I was hoping access would do, but I think this will
work.

Ed Warren.
 
I have failed to understand the method that I should use.

I really am "getting started" and I am lost. I need step by step
instructions please.

Thanks,

Robin
 
I have failed to understand the method that I should use.

I really am "getting started" and I am lost. I need step by step
instructions please.

It is not possible to have a relative path in your links. It is possible to
refresh (or create) links via code (a somewhat advanced topic). It is also
possible in code to determine the location that the current MDB file resides in.
Combining those two produces code that can relink to all tables found in a file
in the same folder that the front end file resides in or a relative path from
that starting point.

If you want to experiment with this then see the code at this link...

http://www.mvps.org/access/tables/tbl0009.htm

While the code looks daunting you can "use" it without having to understand all
of the internal workings.
 
Thanks Rick,

That has frightened me. I will prepare a full version for export.

Cheers,

Robin
 
Back
Top