Temp Table

S

Saz

Hi,

I have a Temp Table "Maintable_temp" with multiple column. Now among
all those column, I just need to export one column = Customer Service
Number in excel CSV format. I want to save this file in my hard drive
but when I save this file in my hard drive, the file should have
leading three zeros like "0003456". Can anyone help me if I can even
do this?

Thank you,
Saz
 
J

Jeanette Cunningham

Create a query with the info you want to export.
Use transfer text to do the export.
VBA help explains how to use transfer text.
For the file name use "0003456.csv"

Jeanette Cunningham
 
D

Dale Fye

Where are you getting the value for the file name?

Assuming you somehow get to the point where you have a filename that looks
like:

strFileName = "3456.txt"

Then, the way to add the leading zeros, so that the total length of the file
name is 12 characters is:

strFileName = Right("00000000" & strFileName, 12)

HTH
Dale
 
Top