By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,610 Members | 1,613 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,610 IT Pros & Developers. It's quick & easy.

DoCmd.TransferDatabase

P: n/a
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\dbase.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.TransferDatabase acImport, "dBase III", _
"C:\Databases\dbase.dbf", acTable, "dbasefile", _
"TempFile"
---------------------------

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
AccessStarters wrote:
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\dbase.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.TransferDatabase acImport, "dBase III", _
"C:\Databases\dbase.dbf", acTable, "dbasefile", _
"TempFile"
---------------------------


Here is an example that may work for you.

DoCmd.TransferDatabase acImport, "dBase III", "C:\Databases", acTable, _
"dbase.dbf", "TempFile"

Nov 13 '05 #2

P: n/a
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!
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.