通过VBA MS_Access将MS Access表导出为dBase 5 [英] Export MS Access tables as dBase 5 through VBA MS_Access
本文介绍了通过VBA MS_Access将MS Access表导出为dBase 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过VBA将单个表导出为dBase 5文件?
How can I export a single table as a dBase 5 file through VBA?
当前我正在使用此VBA代码:
Currently I am using this VBA code:
DoCmd.TransferDatabase _
acExport, _
"dBase IV", _
"DB_Total", _
acTable, _
"DB_Total", _
"C:\Data", _
False
但是当我尝试执行此代码时,出现以下错误(在荷兰语中,经过粗略翻译):
But when I try to execute this code, I get the following error (in dutch, so roughly translated):
"DB_Total is not a valid path"
但是我不确定路径是什么,因为我要导出的表在Access文件中,对吗?
But I'm not really sure what the path is, because the table I am trying to export is inside the Access file, right?
推荐答案
您应该在第4个参数中需要输出数据库的完整路径:
You should need the full path to the output database in the 4th parameter:
DoCmd.TransferDatabase acExport, "dBase IV", "c:\full\path\to\output", acTable, "TableNameInAccess", "DBFTable", False, False
此外,我相信您必须将输出(DBFTable)的字符数限制为8个或更少,因为它是dBase IV.
Also I believe you will have to limit your output (DBFTable) to 8 or fewer characters because it is dBase IV.
这篇关于通过VBA MS_Access将MS Access表导出为dBase 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文