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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to link a password protected database? 2

Status
Not open for further replies.

ide

Programmer
Apr 10, 2001
236
EU
I want to link a table.
If the BetetMain.mdb hasn't database password, the

DoCmd.TransferDatabase acLink, "Microsoft Access", _
actPath & "\Betet\BetetMain.mdb", acTable, "Betet", "Betet"

command works.
Otherwise it inputs the correct password and after it does not makes the link to the table.

What can I do?

ide
pls HELP!
8::(
 
Use the TableDef.Connect Method
Look in help
If you don’t get it than let me know I will be happy to help you

Jn88
 
pls give more info, how to use it.

Set dm = OpenDatabase(actPath & "\Betet\BetetMain.MDB", False, False, ";PWD=a")
Set tdfLinked = dm.TableDefs("Betet")

what follows after it?
thank you very much
ide
 
Dim tdf As TableDef
Dim db As Database

Set db = CurrentDb

set tdf = db.TableDefs("Betet")

tdf.Connect = ";database =c:\ejts_data.mdb ;pwd=1414"

tdf.RefreshLink

Hope this helps if not let me know

Jn88
 
Jn88,
It's perfect.
Thank you again.
Regars
ide
s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top