MS Access VBA Another

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Export Database

DoCmd.TransferDatabase transfertype:=acExport, _

databasetype:="Microsoft Access", _

databasename:="C:\Documents and Settings\Leidago\My Documents\destination.mdb", _

ObjectType:=acTable, Source:="users", _

Destination:="userstbl", structureonly:=True

Export PDF

DoCmd.OutputTo objecttype:=acOutputReport, objectName:=Me.Name, outputformat:=acFormatPDF,

outputFile:=filePath

Export Query to Excel

DoCmd.OutputTo objecttype:=acOutputQuery, objectName:="Query1", outputformat:=acFormatXLS,


outputFile:="c:\temp\ExportedQuery.xls"

Export Table to CSV or Text file

DoCmd.TransferText transfertype:=acExportDelim, specificationname:="Table1 Export Specification", _

tablename:="table1", filename:="C:\Documents and Settings\myfriends.csv", hasfieldnames:=True

You might also like