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!

Module Not Found and Error 2507 1

Status
Not open for further replies.

zevw

MIS
Joined
Jul 3, 2001
Messages
697
Location
US
I am trying to create a link in an external database through the following code suggested to me in a different thread.

Code:
Dim objAccess As Access.Application
Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase "C:\ForeignDb.mdb"
objAccess.DoCmd.TransferDatabase acLink, , CurrentDB.Name, , "Table1", "Table1"
objAccess.DoCmd.TransferDatabase acLink, , CurrentDB.Name, , "Table2", "Table2"
objAccess.Quit
Set objAccess = Nothing

When reaching this line of code
Code:
objAccess.OpenCurrentDatabase "C:\ForeignDb.mdb"

I get the following error

"Module Not Found"

I then tried creating a link to a different Database, and I got past the above line of code. What is the matter with the ForeignDb.mdb database that it is giving me this message?

Once I got through that line by creating a link to a different database. I got through to the next line of code
Code:
objAccess.DoCmd.TransferDatabase acLink, , CurrentDb.Name, , "Table1", "Table1"

and I am gettting this error
Run-time Error '2507':

The type isn't an installed database type or doesn't support the operation you chose.



 
Because I am not going to be the one doing it. A user is going to run code to read information of that database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top