Here is an example where I am doing that while creating a new database file.
Set wrkDefault = DBEngine.Workspaces(0)
Set dbsNew = wrkDefault.CreateDatabase("A:\MyDatabase.mdb", _
dbLangGeneral & ";pwd=password", dbVersion30)
'Export the needed tables and queries
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "",
acTable, "D10db", "D10db", , True
DoCmd.TransferDatabase acExport, "Microsoft Access", "" & dbsNew.Name & "",
acTable, "tblTeam", "tblTeam", , True
'etc
You can probably do the same thing using OpenDatabase instead of
CreateDatabase to transfer the object to an existing database.
--
Wayne Morgan
Microsoft Access MVP
"Jens Hofmeier" <ho***@hotmail.com> wrote in message
news:c8***********@ulysses.news.tiscali.de...
Hello,
i want to transfer a table from database sourceMDB to a password
protected database named destMDB. I was not able to figure out where to
specify the required password ind the parameters of TransferDatabase.
Can anyone help?
Thanks,
Jens