Re-link BE databases (multiple) with password

tfaiers

Registered User.
Local time
Today, 22:57
Joined
Apr 26, 2002
Messages
54
Hi Everyone,

I've looked in depth at the varying ways of re-linking my FE database to two BE databases located at two different paths. The closest I've got is by using FRefreshLinks code but I couldn't work out how to set the passwords.

The scenario is the following:

FEDatabase.ACCDB (2010 Access Database) linked to:

BEDatabase1.MDB at path with password1
&
BEDatabase2.MDB at path\log with password2


So the actual code would need to check the links are currently available on database startup and if not, ask for the new 'path' and relink the two databases using the predefined passwords.

The only user interaction should be that they specify the folder where the BE database 1 file resides as database 2 is one folder down in a 'log' folder.

I'd hoped this should be reasonably easy as there's not a lot of variables to take care of as most are predetermined except for the current path.

Thank you all in advance.
 
Code:
Currentdb.TableDefs("tblName").Connect = "MS Access; PWD = strPassword; Database= strdbName"
Currentdb.TableDefs("tblName").RefreshLink
 

Users who are viewing this thread

Back
Top Bottom