473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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\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
2 14568
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: KJones | last post by:
Here is the setup There are three Machines all running Access97 & XP Pro \\readingtill1 \\redingback \\redingtill2 on a LAN And four dbs
2
by: Pachydermitis | last post by:
Hi all, I am trying to use transferdatabase to link tables to a shared backend. If someone is already using the back end, transferdatabase tries to lock the table and causes an error. Is there...
1
by: Jens Hofmeier | last post by:
Hello, i want to transfer a table from database sourceMDB to a password protected database named destMDB. I was not able to figure out where to specify the required password ind the parameters...
0
by: astro | last post by:
I'm trying to copy some ODBC linked tables from one access2k mdb to another. This is an example of the code i'm using: DoCmd.TransferDatabase acExport, "Microsoft Access", (strPath & strTemp),...
1
by: amitkumar19 | last post by:
hello dear when i use this statements in vb6 for transfer data to one another DoCmd.TransferDatabase acImport, "dBase III", "C:\Data", acTable, _ "Test112A.dbf", "TempFile" then give a error...
1
by: amitkumar19 | last post by:
hello dear when i use this statements in vb6 for transfer data to one another DoCmd.TransferDatabase acImport, "dBase III", "C:\Data", acTable, _ "Test112A.dbf", "TempFile" then give a error...
0
by: Cuaracao | last post by:
This is my code: Code1: 'DoCmd.OpenTable "tblImport" 'DoCmd.TransferDatabase acExport, "dBASE IV", strOutputDir,acTable,"sel_TblImport", strDbfName & ".dbf", False ' DoCmd.Close acTable,...
3
by: chris.spano | last post by:
I'm running Access 2003 on an XP machine, and there are multiple developers who are working on different "assignments" of our large database project. We all work on a local copy and export changes...
10
by: Dean | last post by:
My client has a db I am working that uses temp tables. During an update procedure, I had the code If fTableExists(tempTblName) = True Then DoCmd.DeleteObject acTable, tempTblName Then I thought...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.