Link to home
Start Free TrialLog in
Avatar of wilpitz
wilpitz

asked on

Export Access Query (or report) to text files

I have a list of codes that I need to create a text file for each code in my query. I am able to see what I want in my query and even export it with a single code in the queyr but I am wanting to automate the process to run off a list of all the codes(via table or query) in an automated fashion. I have Access 2003 now but I am getting Access 2010 soon so I dont know if the new version has something that I can use for this.

I need help in figuring out what way would be the best.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

<...run off a list of all the codes>

what list of codes are you referring to?

to  use automation to export queries/table to a text file, you will need export specification..

see this link

http://support.microsoft.com/?kbid=208991

after creating the export specification, you can use this command to export the queries or tables


DoCmd.TransferText acExportDelim, "ExportSpecName", "TableNameOrQueryName", "C:\myText.txt", True



<I have Access 2003 now but I am getting Access 2010 soon so I dont know if the new version has something that I can use for this. >

yes, you can still use the export specification that you created in A2003.
ASKER CERTIFIED SOLUTION
Avatar of danishani
danishani
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial