Board index » Visual Studio » Exporting Data via a Access Object and TransferDatabase

Exporting Data via a Access Object and TransferDatabase

Visual Studio70
Hi,

I've created an Access Object in VB in Word. I can read the dbase,

import data into it etc but when I try to export data as a dBaseIV file

it fails with error "The Microsoft Jet Database engine could not find

the object."

I tried to export as Access and it works fine.

Here is the code that fails.

---

ACC.DoCmd.TransferDatabase acExport, "dBase IV",

"C:\data\work\",acTable, "mytable", "C:\data\Work\cdata.dbf", False

---



"ACC" is the name I gave to the Access database



I've puzzled over this for days, searched for detail - Can this be a

bug in the MS Object??



Chris


-
 

Re:Exporting Data via a Access Object and TransferDatabase

Have you tried turning on Record Macro and doing this manually - then

comparing your code?



<Chris.Smith.IT@gmail.com>wrote in message

Quote
Hi,

I've created an Access Object in VB in Word. I can read the dbase,

import data into it etc but when I try to export data as a dBaseIV file

it fails with error "The Microsoft Jet Database engine could not find

the object."

I tried to export as Access and it works fine.

Here is the code that fails.

---

ACC.DoCmd.TransferDatabase acExport, "dBase IV",

"C:\data\work\",acTable, "mytable", "C:\data\Work\cdata.dbf", False

---



"ACC" is the name I gave to the Access database



I've puzzled over this for days, searched for detail - Can this be a

bug in the MS Object??



Chris







-

Re:Exporting Data via a Access Object and TransferDatabase

within access the vb

DoCmd.TransferDatabase acExport, "dBase IV",

"C:\data\work\",acTable, "mytable", "C:\data\Work\cdata.dbf", False

Works.



Yet cetting the object and calling the same code from word does not...



-