exporting multiple tables

  • Thread starter Thread starter Angela
  • Start date Start date
A

Angela

Hi,
I have 6 tables in my database.
Depending on which tables the user choses, I want to be able to export those.
So if the user picks 4 tables to export, I want to be able to export 4
different text files.
Please help.
Thank you.
 
Sub Exporting()

Dim obj As AccessObject, dbs As Object

Set dbs = Application.CurrentData

' Check each object of the AllTables collection
For Each obj In dbs.AllTables
DoCmd.OutputTo acOutputTable, obj.Name, "MS-DOSText(*.txt)", "",
False, "", 0, acExportQualityPrint
Next obj
End Sub
 
Back
Top