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!

linking a table of a database-password protected mdb

Status
Not open for further replies.

ide

Programmer
Apr 10, 2001
236
EU
Hi you all,
(and sorry for my English..:)

I have a problem, what I couldn't solve for a long time (DAO).
How could I link from mdb1 a table of a database-password protected Access file (mdb2) via VBA?

mdb2: actpath & "\Betet\BetetMain.mdb"
table name: "Betet"

If it hasn't database password, the

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

command works, but otherwise it inputs the correct password, and it does not insert the link to the table.

If I open mdb2 with

Set dm= OpenDatabase(actPath & "Betet\BetetMain.mdb", False, False, ";PWD=MyPssW")

it leads up to linkin?

thanks,
ide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top