Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relink a link table to a passwork protected table.

Status
Not open for further replies.

EZEason

Programmer
Dec 11, 2000
213
US
I have 2 mdb databases. One is the backend that hold all the information, while the second has the linked table in it and is the front-end. I'm trying to write a code that will relink to the back end if the link is lost for some reason. (The back in is on a cd.) All of this is read only information. The problem I'm haveing is the back end is password protected and I do not want the user to know the password. Who do I put my password in to the code??? Here is a sample of my code.
DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\Home.mdb", acTable, "Hometbl", "Hometbl", False What doesn't kill you makes you stronger.
 
Maybe sometjing on the lines of:

Dim wrk as Workspace
Dim dbProtected as Database

Set wrk = DBEngine.Workspaces(0)
Set dbProtected = wrk.OpenDatabase("c:\path\database.mdb", _
False, False, ";PWD=curry")

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top