Create a macro "Macro1" that exports the text file you want and closes the DB.
Then add "/x Macro1" to you command line.
Thank you for the reply, I tried your suggestion and I have not been able to get it to do what I want. Specifically (failed to mention this earlier) that I would like this to be dynamic in nature, that is, I would like to be able to specify the following at the time of the execution of the Macro:
1. name of the source database
2. format of the output ( comma or tab delimited)
3. name of the output file
Thank you for the reply, I tried your suggestion and I have not been able to get it to do what I want. Specifically (failed to mention this earlier) that I would like this to be dynamic in nature, that is, I would like to be able to specify the following at the time of the execution of the Macro:
1. name of the source database
2. format of the output ( comma or tab delimited)
3. name of the output file
Is this possible?
thanks
Here is the link to the full set of command line switches.
http://support.microso ft.com/kb/209207
However why not just either create an Access object in whatever is calling Access (such as Word or Excel) and feed it all your variables directly or link to the Access tables that have the data you want exported.
Is there a way to use the command line (Access 2003) to export Access tables to text files?
Thanks
skkydiver
[CODE=vb]
'The following code will transfer the Table you specify to a Delimited Text File
DoCmd.TransferT ext acExportDelim, , "<Table Name>", "C:\<Absolu te Path>\<File Name>.txt", True[/CODE]
Comment