By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Command Line - Export

P: 4
Hello,

Is there a way to use the command line (Access 2003) to export Access tables to text files?

Thanks

skkydiver
Jan 11 '08 #1
Share this Question
Share on Google+
4 Replies


P: 45
Create a macro "Macro1" that exports the text file you want and closes the DB.

Then add "/x Macro1" to you command line.
Jan 11 '08 #2

P: 4
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

Is this possible?

thanks
Jan 12 '08 #3

P: 45
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.microsoft.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.
Jan 12 '08 #4

ADezii
Expert 5K+
P: 8,624
Hello,

Is there a way to use the command line (Access 2003) to export Access tables to text files?

Thanks

skkydiver
Expand|Select|Wrap|Line Numbers
  1. 'The following code will transfer the Table you specify to a Delimited Text File
  2. DoCmd.TransferText acExportDelim, , "<Table Name>", "C:\<Absolute Path>\<File Name>.txt", True
Jan 12 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.