Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / January 2004

Tip: Looking for answers? Try searching our database.

Re-Linking tables w/Relative path

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 24 Jan 2004 22:06 GMT
Hi,
I have an Access 2k app I am deploying which has a front
end backend design, but there are some "local" back end
tables that sit on the users workstation.  All of the
front end and local backend files are contained within one
folder.  By default, the front end looks for these local
back end tables in the C:\myfoldername directory.  
However, some users may need to put their folder in the H:
or G: drive.  The only way I know to re-establish the
links is to have them run the Linked Table manager.  I'd
like to automate a proceedure so they don't have to do
anything at all.  I've been told Access doesn't use
relative paths (which would work great in this scenario)
and I was pointed to a code sample at an mvp site that is
supposed to check to see if links are established, but
even that code prompts users to choose a location.  Any
thoughts?  Thanks,
-Rick
John Nurick - 25 Jan 2004 07:22 GMT
Hi Rick,

I've done this in the past by modifying the code from the MVPs site so
it

    1) checks whether the current links are valid
    2) if not, tries to link to a back end mdb in the same
      folder as the front end (extracting the path from
      CurrentDB.Name)
    3) if that fails, prompt the user.

>Hi,
>I have an Access 2k app I am deploying which has a front
[quoted text clipped - 14 lines]
>thoughts?  Thanks,
>-Rick

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Rick - 25 Jan 2004 14:18 GMT
Thanks.  On number 2, could you point me in the right
direction on how to extract the name from the
currentdb.name?  I think this would work.  Thanks again,
-Rick
>-----Original Message-----
>Hi Rick,
[quoted text clipped - 32 lines]
>Please respond in the newgroup and not by email.
>.
Douglas J. Steele - 25 Jan 2004 16:00 GMT
The path can be determined as Left$(CurrentDb.Name, Len(CurrentDb.Name) -
Len(Dir$(CurrentDb.Name)))

In Access 2000 and up, you can also use CurrentProject.Path

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

> Thanks.  On number 2, could you point me in the right
> direction on how to extract the name from the
[quoted text clipped - 42 lines]
> >Please respond in the newgroup and not by email.
> >.
Bruce M. Thompson - 26 Jan 2004 16:56 GMT
> Thanks.  On number 2, could you point me in the right
> direction on how to extract the name from the
> currentdb.name?  I think this would work.  Thanks again,

To extract just the database *name* in any version of Access, you can use:

   Dir(CurrentDb.Name)

... Or, in Access 2000 and later ...

   CurrentProject.Name

If you really meant the *path*, Doug Steele has provided you with that
information in his post.

Signature

Bruce M. Thompson, Microsoft Access MVP
bthmpson@mvps.org (See the Access FAQ at http://www.mvps.org/access)

>> NO Email Please. Keep all communications
    within the newsgroups so that all might benefit.<<
Armen Stein - 30 Jan 2004 06:03 GMT
> Hi,
> I have an Access 2k app I am deploying which has a front
[quoted text clipped - 14 lines]
> thoughts?  Thanks,
> -Rick

Hi Rick,

We have a relinking utility that we offer to other developers at a
nominal cost.  It automatically relinks to multiple Access back-end
databases, prompting if necessary, and also has a feature that
automatically relinks to a back-end database in the application's folder
if it exists there.  We've used it in hundreds of projects, and I think
it may do what you want.

If you are interested, please contact me via email.

Signature

Armen Stein
J Street Technology, Inc.
Armen _@_ JStreetTech _._ com

Bruce M. Thompson - 30 Jan 2004 17:52 GMT
The code John Nurick has referred to at the MVPs site is free.

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

Signature

Bruce M. Thompson, Microsoft Access MVP
bthmpson@mvps.org (See the Access FAQ at http://www.mvps.org/access)

>> NO Email Please. Keep all communications
    within the newsgroups so that all might benefit.<<
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.