Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 6th, 2006, 07:15 AM
Registered User
Join Date: Apr 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default using DoCmd.TransferDatabase in VB

Hi All,

I am not able to understand how to use docmd.transferDatabace in VB6.0 application.

It is working fine if i am using this with Ms access macros.

DoCmd.TransferDatabase acExport, "Microsoft Access", strFile, acTable, strTable, strTable

when I tried to use the same in an VB6.0 application it gives error like this operation requires an open connection.

Please help me

Reply With Quote
  #2 (permalink)  
Old April 21st, 2006, 04:01 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

What library do you have added in your references to get access to a “DoCmd” class?
I opened a VB project to look into your question, and there is no "DoCmd" class available.
I tried adding DAO and Jet, but neither had that class in them.
Reply With Quote
  #3 (permalink)  
Old May 18th, 2006, 10:52 PM
Registered User
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

    Dim acApp As Access.Application
    Set acApp = New Access.Application
    acApp.OpenCurrentDatabase MDBFile
    acApp.DoCmd.TransferDatabase acExport.....

you can use 'DoCmd.TransferDatabase' in Ms access macros,because it's just embed in Access application,but to do this in VB,you will have to build an application in advance.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help regarding DoCmd Pramodhegde Access VBA 1 September 7th, 2007 07:05 AM
Error when using TransferDatabase DrewMills Access VBA 2 November 14th, 2005 06:09 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

All times are GMT -4. The time now is 06:12 PM.

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