Export an Access Table as an dbase III file

F

FedWerkker

I was thinking this should be simple. I want to copy, transfer or whatever
the TBS Table in the VPS_TBS.mdb database and send it to our shared drive,
but have the file be a .dbf file.

I tried the F1 Help

DoCmd.TransferDatabase acExport, "DBASE III",
' "C:\@CDATA\VP_tbs.mdb", acTable, "tbs", _
' "K:\CPANALYSIS\BusinessMgt\VP\Access\DBASE\tbs1.dbf"

I've tried this in a Macro, and in code, but ways fails. The error tells me
the path doesn't exist, but that is the path. Does anyone see any obvious
errors. If you know a of way (right click, Exprort, save as, choose where
works fine, but I'd like to get in code if possible.

MS Access 97:

thanks
Bill
 
S

Steve

Hello Bill,

Try exporting your file with a .mdb extension then renaming the file to a
..dbf file. Put the following code after your DiCmd.TransferDatabase command:

Dim OldName, NewName
OldName = "K:\CPANALYSIS\BusinessMgt\VP\Access\DBASE\tbs1.mdb"
NewName = "K:\CPANALYSIS\BusinessMgt\VP\Access\DBASE\tbs1.dbf"
Name OldName As NewName

Steve
(e-mail address removed)
 
J

John Spencer

I think your arguments should be more like the following


DoCmd.TransferDatabase acExport, "DBASE III",
"K:\CPANALYSIS\BusinessMgt\VP\Access\DBASE\tbs1.dbf", acTable, "tbs", _
"Name for the table in the target database"




John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
K

KARL DEWEY

I do not think that just changing a file extension from .mdb to .dbf will
make it work as a dBaseIII database.
 
K

KARL DEWEY

The error tells me the path doesn't exist, but that is the path.
Is it possible that the @ in the folder name is throwing it off?
 
J

John W. Vinson

Try exporting your file with a .mdb extension then renaming the file to a
.dbf file. Put the following code after your DiCmd.TransferDatabase command:

Good Lord, Steve.

That's like putting a Chrysler hood ornament on a Toyota Camry and assuming it
will become one. .mdb and .dbf files have utterly different structures.
 
J

John W. Vinson

I was thinking this should be simple. I want to copy, transfer or whatever
the TBS Table in the VPS_TBS.mdb database and send it to our shared drive,
but have the file be a .dbf file.

I tried the F1 Help

DoCmd.TransferDatabase acExport, "DBASE III",
' "C:\@CDATA\VP_tbs.mdb", acTable, "tbs", _
' "K:\CPANALYSIS\BusinessMgt\VP\Access\DBASE\tbs1.dbf"

I've tried this in a Macro, and in code, but ways fails. The error tells me
the path doesn't exist, but that is the path. Does anyone see any obvious
errors. If you know a of way (right click, Exprort, save as, choose where
works fine, but I'd like to get in code if possible.

dBase is very picky about 8 character fieldnames. Try exporting to a C: folder
with a folder name of 8 alphanumeric characters or fewer.
 
D

david

Perhaps you don't think that just changing the file extension
will make the export work, but it is a reasonable suggestion.

For example, suppose you were trying to export a .RTF
file using:

DoCmd.TransferText acExportMerge, , "tblMerge",
"C:\CodeProgrammes\Merge1.doc

That won't work, and the solution is to


However, in this case, I think it is the 8 character export folder
problem, rather than the file extension problem.

(david)
 
S

Steve

Good Loord, John.

You are such an ignoramus!!!! You think you know it all and that gives you
the right to be insulting to other people.

See David's response. My suggestion may not work but is reasonable to give
it a try. The OP's TransferDatabase statement exports his table as a DBase
III file so it can be saved with any extension including .mdb.

You are nothing but a hypocrite!!! You condone the conduct of visio john and
arno r but have a hair trigger to criticize me. That is one hundrd eighty
degrees oposite of the conduct expected of an mvp.

Steve
 

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