Is there a way to export a table to a .txt format (doesn’t matter if tab or comma delimited) using the DoCmd.TransferDatabase command?
I am attempting to export a table to another location in a .txt format using the DoCmd.TransferDatabase command. This is the current command…
DoCmd.TransferDatabase acExport, “Microsoft Access”, “G:IRMPIRMP_Grain.mdb”, _
acTable, “tblYearEnd”, “G:AppsAccesstblYearEnd.txt”
When I try to run this, I get an error saying that G:AppsAccesstblYearEnd.txt is not a valid name, though this is where I would like the destination to be. If I drop the tblYearEnd.txt, it runs OK, but the table does not show up in the directory G:AppsAccess.
I know that this can be done manually by selecting the table, then doing File/Export, etc. which works fine – I am trying to automate the process.
I searched Help to determine if the command was set up incorrectly. Help shows examples for Import and Linked tables, but not Export, so I assume since I get no errors, it must be acceptable (wrong, but acceptable). I am running out of ideas.
Any help is really appreciated.
Steve