Export to text.

S

Shree

Hi!
I am trying to export a table to a text file. One of the
columns is a number data type. It is a column with field
size 4 and has numbers ranging from 1 to 1000 in it. The
problem is that the 1000 number is exported fine. But the
number 1 is getting left aligned instead of right aligned
and is therefore causing problems in the exported copy. Is
there a way to align the numbers ot the right on export?
Thanks in advance.
shree
 
G

Gavin Webb

Hi Shree,

I've just tried looking at exports to find a solution.
All I can think of is to export it as a delimited file
instead of a fixed width file.
That way, it is left to whatever application you are
importing it into to decide how to align the figures.

Sorry I can't find anyway to force it to right align
figures in fixed width format. I thought there was
a 'leading zeros' option, but that seems to be only for
dates.

G
 
J

John Nurick

Hi Shree,

Export a query instead of the table. In the query, include all the
fields you need. For this particular column, use a calculated field with
an expression like this, where NumField is the name of the field:
fNumField: Right(" " & CStr([NumField]), 4)


Hi!
I am trying to export a table to a text file. One of the
columns is a number data type. It is a column with field
size 4 and has numbers ranging from 1 to 1000 in it. The
problem is that the 1000 number is exported fine. But the
number 1 is getting left aligned instead of right aligned
and is therefore causing problems in the exported copy. Is
there a way to align the numbers ot the right on export?
Thanks in advance.
shree

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

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