Temp Table

  • Thread starter Thread starter Saz
  • Start date Start date
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
 
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
 
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
 

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

Back
Top