creating a .dbf file using Access VBA code

G

Gez

Hi,

How do you create .dbf file using Access VBA code. I can do it manually
using the export option but I can't work out how to do it with code.

Cheers,

Geraint
 
C

Cheryl Fischer

In VBA Help, check out the TransferDatabase method. One of its arguments is
Database Type, which allows output to dBase file formats.
 
L

Luiz Cláudio

You can use a query if you prefer:

SELECT column-list

INTO file-name-without-extension

IN "c:\YourFolder" "dBase IV;"

FROM Your-Access-table;



[]

Luiz Cláudio C. V. Rocha

São Paulo - Brazil
 
G

Gez

Luiz,

Thats exactly what I was looking for, thank you!


Luiz Cláudio said:
You can use a query if you prefer:

SELECT column-list

INTO file-name-without-extension

IN "c:\YourFolder" "dBase IV;"

FROM Your-Access-table;



[]

Luiz Cláudio C. V. Rocha

São Paulo - Brazil


Gez said:
Hi,

How do you create .dbf file using Access VBA code. I can do it manually
using the export option but I can't work out how to do it with code.

Cheers,

Geraint
 
G

Gez

TransferDatabase does allow you to transfer the table to an existing .dbf
but it does not appear to automatically create a new .dbf file. Unless I'm
doing something wrong!
 
G

Gez

Damn, I may have spoken too soon. The sql method works in as far as it
creates a new .dbf file but it does not appear to have exported the ole
objects from the original table. Are any additional parameters required?

The manual export to .dbf method does export this detail so it must be
possible, but how?
 

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