Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2005, 09:06 PM
Registered User
 
Join Date: Feb 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error when using TransferDatabase

Hi,

I get a run time error '2507', "The type isn't an installed database type or doesn't support the operation you chose.", when trying to execute the following code:

DoCmd.TransferDatabase acLink, , strDatabaseName, , "tblLogShip", "tblLogShip"

My desire is to link the table "tblLogShip", which is contained in another .mdb database whose name is contained in the variable strDatabaseName. I have checked and rechecked all of the variables at run-time and can't find anything amiss. Anyone else come up against this?
 
Old November 14th, 2005, 08:58 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Why are you using this method to link the database? Can't you do this using Insert>Table>Link Table?

Did you put the proper path to the file in your strDatabaseName variable? Is the other database in a later format than the one you are working in?

mmcdonal
 
Old November 14th, 2005, 06:09 PM
Registered User
 
Join Date: Feb 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need to link to this table (and one other) at application startup because the database will be run in different locations, with different paths to the linked tables on each local machine. Each of the linked tables may also change independently of the calling application. The aim of the startup routine is to link to the appropriate tables stored in the application's parent directory, wherever that may be (this is determined by a seperate routine) and then create a union query to extract the data from both tables for presentation in a form.

The full path of the database I wish to link to is contained in the variable 'strDatabaseName' and all databases are in Access2000 format.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
using DoCmd.TransferDatabase in VB gsurjit VB How-To 2 May 18th, 2006 10:52 PM
transferdatabase help clowns119 Access VBA 0 February 19th, 2005 11:57 AM
TransferDatabase Macro jmss66 Access 13 January 21st, 2005 11:22 AM
DoCmd.TransferDatabase poonjabba Access VBA 1 August 19th, 2003 07:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.