[AccessD] BE Relinker

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Tue Jan 17 22:11:09 CST 2006


I use Tribble's relinker.  I'm not sure if it's still on the web 
somewhere.  But, if it can't find the BE tables in the FE folder it 
opens the file open dialog box and asks you to point to the back end and 
then relinks.  Very nice piece of code.

Rocky


Stuart McLachlan wrote:
> On 17 Jan 2006 at 8:09, Joe Hecht wrote:
>
>   
>> Did some kind, generous and way smarter then me soul create
>> at BE relinker?
>>
>>     
>
> Here's my standard module that I use when the BE and FE are in the same 
> directory.  Not that it if your BE is password protected, you will need to 
> modify this slightly since "tdfloop.Connect" will contain additional info 
> before the first semicolon. 
>
>
> Function RelinkTables() As Long
> Dim tdfloop As TableDef
> With CurrentDb
>         For Each tdfloop In .TableDefs
>             If Left$(tdfloop.Connect, 10) = ";DATABASE=" Then
>                tdfloop.Connect = ";DATABASE=" & ApplDir & 
> FileBasename(Mid$(tdfloop.Connect, 11))
>                tdfloop.RefreshLink
>             End If
>         Next tdfloop
> End With
> End Function
>
> Static Function ApplDir() As String
>    Dim strApplDir As String
>    Dim strTemp As String
>    If strApplDir = "" Then
>     strTemp = DBEngine(0)(0).Name
>     strApplDir = Left$(strTemp, InStrRev(strTemp, "\"))
>    End If
>    ApplDir = strApplDir
> End Function
>
> Function FileBasename(fullpath As String) As String
>     FileBasename = Right$(fullpath, Len(fullpath) - InStrRev(fullpath, 
> "\"))
> End Function-- 
> Stuart
>
>
>   

-- 
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com




More information about the AccessD mailing list