exporting multiple tables

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.
 
R

ryguy7272

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
 

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