Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    20

    Unanswered: importing dbf file to Access using Transferdatabase

    Hello Everyone,
    I've been trying to create a macro that will automate importing dbf tables into access.

    I have this setup
    Transfer type: Import
    database name: dbase 5.0
    Source: Z:\filename.dbf

    however, I keep getting an error message: "invalid file path". I know this path is correct. Does anyone know what I'm doing wrong?

    Thanks!

  2. #2
    Join Date
    Apr 2004
    Posts
    18
    can you post the docmd.transferdatabase statement as you have it...
    DAO/ADO/VB.net/VBA/Access2K/Excel2K/SQL2000/Essbase/OFA/Oracle OPM, IM, EAM/Discoverer/ SQLPlus

  3. #3
    Join Date
    Jun 2004
    Posts
    20

    Transferdatabase Macro

    Hi.
    I didnt use the vba editor to create this macro. In Access, under the Macro tab, I created a Macro like this:

    Action: Transfer database
    Transfer type: Import
    database type: dbase 5.0
    database name: z:\freezers.dbf
    object type: table
    source: freezers.dbf
    destination: table 1
    structure only: no

    This macro works for other database types however I'm trying to import a foxpro table and I'm running into all these errors. Should I have used ODBC as database type?

    Thanks...

  4. #4
    Join Date
    Jun 2004
    Posts
    20

    transferdatabase action

    I think I figured out the problem.

    database name should have been- Z:\
    while source should have been- freezers.dbf

    I read that to import foxpro files, the database name should be the directory where the files are located and the source should be the full table name. When I made the above changes to my macro, it worked!

    Now I'm going to try importing a much larger dbf file. Hope it works....

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •