Export Text File Name Problem

S

Sam

I have a need to export a table to a text file and give
that file a long file name containing multiple periods in
the name. For example:

DoCmd.TransferText acExportFixed, "EXP_7", "CURRENT
DATA", "C:\DATA\OUTPUT\VBA.EXP.TST.CUSTOM.EXT"

This should export the table "CURRENT DATA" to the file
name: "VBA.EXP.TST.CUSTOM.EXT", but when Access97 writes
the file, the periods are changed to pound signs:
"VBA#EXP#TST#CUSTOM.EXT".

This is not a big deal but will, otherwise, take extra
steps to delete and rename files.

Thanks in advance.
Sam
 
J

Joe Fallon

Looks like you will have to take that extra step.
You can use VBA code to locate the bad name and then try re-naming it.
This can be included as an extra step to your procedure.
 

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