Import dbf with VBA

T

torreon

Hi:
I would like to import an Dbase IV table (dbf) in a mdb proyect with VBA.
I have found code to import an access proyect table into another access
proyect but this isn`t valid to me.
Anybody knows how make it??

thank you
 
D

Douglas J Steele

You should be able to use the TransferDatabase method. Try "dBase
IV;DATABASE=C:\dBASE\Samples" for the database type (pointing, of course, to
the correct location!)

If I recall correct, the dBase file must be a short file name (i.e. in 8.3
format)
 
T

torreon

I'm tried with
DoCmd.TransferDatabase , "dBase IV", "C:\indicar.dbf", acTable

and the program shows an error 3044.

I have done manualy the import in access proyect an d it isn´t any problem.

thank you
 
T

torreon

Sorry,
I'd saw in internet and I have found the solution:

DoCmd.TransferDatabase , "dBase IV", "c:\", acTable, "indicar.dbf",
"indicar"

thank you for your time
 

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