Absolute and Relative Pass?

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi anyone,

I have a database with Data and Forms separated.
Data in one Database, Forms and all programming stuff in
another.
My question is:
How to set the pass to the linked tables from Forms
Database to Data Database, so if I transfer the two
databases into another machine, it will find the linked
tables in DATA database?
Right now, I have to reestablish the links (delete -
create) the links every time I show the application to the
customer....:( Because it links with absolute passes.

Any Help will be appreciated.

Alex
 
Normally, I create a install dir, and simply hope that both the FE and the
BE are placed into this dir.

Of course, what most developers do is then check if a backend table can be
opened, if not, then we popup a cute form with a message stating that the
data part could not be found,a and would you like to try and re-link. If you
hit ok, then we pop up the standard windows file browse dialog and let the
person look for the back end.

In fact, what I should really have done is check for the back end table, and
if it fails...TRY THE CURRENT directory..and link. That would be about the
best, as then if both the files are moved to a new dir..then the re-link
would be automatic.

So, you can't use relative pathnames with linked tables..but your code can
check for no back end..and then try re-linking in the same location (the end
result is the something anyway!).

Regardless...any developer after a certain amount of time will cobble up
some code to do the re-linking..as obviously training customers to use the
linked table manager is a bad idea..and further with the runtime you don't
have that manager anyway.

I even for when emailing clients a update...I have a start-up routine that
looks in a config table..and simply re-links to the back end (this is for
cases where I KNOW the location of my clients back end...and it re-links).

Anyway...the code to re-link can be found at:
http://www.mvps.org/access/tables/tbl0009.htm

And, code to pop up the file browse dialog can be found at:
http://www.mvps.org/access/api/api0002.htm

With the above code provided...all the hard work is done...you only need
spend a few hours at most using the above two routines to do whatever you
want at start-up time.
 
Back
Top