Import table from password protected Access Database

  • Thread starter Chris F via AccessMonster.com
  • Start date
C

Chris F via AccessMonster.com

Hello All-

In my front end application (FCv3.accdb) I would like to import a table from
a password protected database called SMS.accdb.

In the code below, I am recieving an error message in the TransferDatabase
function Run-time error '3011', The Microsoft Office Access database engine
could not find the object t0ZRegistration.

Any thoughts on the code below would be greatly appreciated.
Thanks,Chris F

Dim oAcc
Dim db
Dim strForeignDB As String, strProjPW As String

strProjPW = "amy12345"
strForeignDB = PathFrontEnd(1) & "SMS.accdb"

Set oAcc = New Access.Application
Set db = oAcc.DBEngine.OpenDatabase(strForeignDB, False, False, ";PWD=" &
strProjPW)

oAcc.OpenCurrentDatabase strForeignDB
oAcc.DoCmd.TransferDatabase acImport, "Microsoft Access", CurrentProject.
FullName, acTable, "t0ZRegistration", "t0ZRegistration", True

Set db = Nothing
Set oAcc = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top