relink to password protected BE (1 Viewer)

smig

Registered User.
Local time
Tomorrow, 01:58
Joined
Nov 25, 2009
Messages
2,209
I want to put a password to the BE
I understand I can't simply refresh the links, and need to delete all linked tables from the FE and relink them.

How can I do it using a code? As I'll have to do it every time I deploy a new FE version to the end user.
T'ill now I simply pointed to the new location of the BE and refreshed the links.
Code:
For Each tdf In CurrDB.TableDefs
    ' If the table has a connect string, it's a linked table.
    If Len(tdf.Connect) > 0 Then
        tdf.Connect = "MS Access;pwd='" & strDataMDBFilePass & "' ;DATABASE=" & strDataMDBFile & " "
        tdf.RefreshLink         ' Relink the table.
    End If
Next tdf

I have a code to DROP a table from db.
I also have a table with a list of all tables :)
 

smig

Registered User.
Local time
Tomorrow, 01:58
Joined
Nov 25, 2009
Messages
2,209

June7

AWF VIP
Local time
Today, 15:58
Joined
Mar 9, 2014
Messages
5,423
Interesting since it indicates a working solution. I've never had to worry about password protection.

"Doesn't work" means what - error message, wrong results, nothing happens?
 

smig

Registered User.
Local time
Tomorrow, 01:58
Joined
Nov 25, 2009
Messages
2,209
Interesting since it indicates a working solution. I've never had to worry about password protection.

"Doesn't work" means what - error message, wrong results, nothing happens?
Wrong password

I'll investigate it a little bit more
 

Users who are viewing this thread

Top Bottom