VBA调用access自带的导入导出数据功能

导出代码

DoCmd.RunCommand acCmdExportRTF

DoCmd.RunCommand acCmdExportAccess

DoCmd.RunCommand acCmdExportdBase

DoCmd.RunCommand acCmdExportExcel

DoCmd.RunCommand acCmdExportFixedFormat

DoCmd.RunCommand acCmdExportHTML

DoCmd.RunCommand acCmdExportODBC

DoCmd.RunCommand acCmdExportSharePointList

DoCmd.RunCommand acCmdExportSnapShot

DoCmd.RunCommand acCmdExportText

DoCmd.RunCommand acCmdExportXML

导入代码

DoCmd.RunCommand acCmdImportAttachAccess

DoCmd.RunCommand acCmdImportAttachdBase

DoCmd.RunCommand acCmdImportAttachExcel

DoCmd.RunCommand acCmdImportAttachHTML

DoCmd.RunCommand acCmdImportAttachODBC

DoCmd.RunCommand acCmdImportAttachOutlook

DoCmd.RunCommand acCmdImportAttachSharePointList

DoCmd.RunCommand acCmdImportAttachText

DoCmd.RunCommand acCmdImportAttachXML

示例

新建窗体,在窗体上新建命令按钮控件,然后在命令按钮控件的VBA代码下写入相对于的导入导出代码。

 

 

注意:该方法适用于2007/2010/2013/2016的ACCCESS版本。

摘自 http://www.accessoft.com/article-show.asp?id=7991

版权声明:
作者:水东柳
链接:https://shuidl.com/1496.html
来源:水东柳博客
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
< <上一篇
下一篇>>