DoCmd.TransferDatabase

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AccessStarters

    DoCmd.TransferDatabase

    I am trying to Import a simple dbase file into my Ak2 TABLES.
    If I do this manually, it works fine. I get a new table called DBASE with
    all the data looking good.
    If I try and do this using VBA code (see below) I get a path is not valid
    for "C:\Databases\d base.dbf". I know it's valid and have tried putting it on
    the C root and still same error message. I am running Wk2 on single
    wstation. Any help on this will be much appreciated
    D.
    ----------------------------
    DoCmd.TransferD atabase acImport, "dBase III", _
    "C:\Databases\d base.dbf", acTable, "dbasefile" , _
    "TempFile"
    ---------------------------





  • Salad

    #2
    Re: DoCmd.TransferD atabase

    AccessStarters wrote:
    [color=blue]
    > I am trying to Import a simple dbase file into my Ak2 TABLES.
    > If I do this manually, it works fine. I get a new table called DBASE with
    > all the data looking good.
    > If I try and do this using VBA code (see below) I get a path is not valid
    > for "C:\Databases\d base.dbf". I know it's valid and have tried putting it on
    > the C root and still same error message. I am running Wk2 on single
    > wstation. Any help on this will be much appreciated
    > D.
    > ----------------------------
    > DoCmd.TransferD atabase acImport, "dBase III", _
    > "C:\Databases\d base.dbf", acTable, "dbasefile" , _
    > "TempFile"
    > ---------------------------
    >[/color]

    Here is an example that may work for you.

    DoCmd.TransferD atabase acImport, "dBase III", "C:\Databas es", acTable, _
    "dbase.dbf" , "TempFile"

    Comment

    • dale townsend

      #3
      Re: DoCmd.TransferD atabase

      thanks very much.
      Definately helps. I was expecting it to overwrite the destination file
      but keeps adding a new with number on the end. I think all I need to do
      now is write code to delete the destination file first - so it imports
      with exactly the same name.
      The help files were a bit missleading (pasted below)
      -----
      databasename: A string expression that's the full name, including the
      path, of the database you want to use to import, export, or link data.
      -------



      *** Sent via Devdex http://www.devdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...