UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Link Table Password Db, Any Version    
 
   
access2009eg
post Feb 23 2020, 06:02 PM
Post#1



Posts: 1,180
Joined: 19-February 08



Hello, friends;

why this code does not work when link tables in protected DB

CODE
Dim db As dao.Database
Dim sNewLinkAddress As String
sNewLinkAddress = "E:\a_be.accdb"
Set db = CurrentDb
db.TableDefs("Table1").Connect = "PWD=ab;Database=" & sNewLinkAddress
db.TableDefs("Table1").RefreshLink


any Idea or fixing the code

Thank you

--------------------
I would like to Thank you for your help
Go to the top of the page
 
theDBguy
post Feb 23 2020, 06:25 PM
Post#2


UA Moderator
Posts: 77,725
Joined: 19-June 07
From: SunnySandyEggo


What error message are you getting? Have you tried adding a ; before pwd?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
access2009eg
post Feb 23 2020, 06:50 PM
Post#3



Posts: 1,180
Joined: 19-February 08



thumbup.gif

hat_tip.gif


this case if the linked table exist

but if not exist what should I do

--------------------
I would like to Thank you for your help
Go to the top of the page
 
theDBguy
post Feb 23 2020, 07:24 PM
Post#4


UA Moderator
Posts: 77,725
Joined: 19-June 07
From: SunnySandyEggo


You can use the TransferDatabase method.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
access2009eg
post Feb 24 2020, 02:30 PM
Post#5



Posts: 1,180
Joined: 19-February 08



thumbup.gif

--------------------
I would like to Thank you for your help
Go to the top of the page
 
access2009eg
post Feb 24 2020, 02:31 PM
Post#6



Posts: 1,180
Joined: 19-February 08



what about this
https://www.UtterAccess.com/forum/index.php...2056929&hl=

--------------------
I would like to Thank you for your help
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    4th April 2020 - 07:08 AM