Link to home
Start Free TrialLog in
Avatar of amangia
amangiaFlag for United States of America

asked on

ExportText number justification

I am exporting a data file where it seems no matter what I do, the justification is to the left.  the number is a double/fixed/2 decimal in table.  What is the deal?

Thanks

Tony
Avatar of nico5038
nico5038
Flag of Netherlands image

All numbers will be left justified as the lading zero's will be suppressed.
Did you try to append spaces to the left to get a fixed width like:

select right("          " & [numberfield],10) as FixedNumberField, ...

Nic;o)
Avatar of peter57r
Hello amangia,

What format are you exporting to?


Pete
Avatar of amangia

ASKER

I am exporting to a text file.
Did you try to export into a fixed format ?

Nic;o)
Avatar of amangia

ASKER

I am exporting to a fixed format and am using an export spec.
Hmm, strange as it looks like the number field is seen as text....
Did you try my uggly workaround ?

Nic;o)
Avatar of amangia

ASKER

To be honest, I don't know WHERE to put the workaround.  I am exporting out of a table.  I have a form with a button.  The Event Procedure behind it is:
DoCmd.TransferText acExportFixed, "FoodBuy Export Specification", "foodbuy1", "c:\RBF01" & " " & Format(Now(), "mm - yy") & ".txt", False.

Where abouts would I put the ugly little booger?
ASKER CERTIFIED SOLUTION
Avatar of nico5038
nico5038
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amangia

ASKER

I did that, but still to no avail.  So...I got to thinking and changed the field type to TEXT.  Bingo!  Works now.  

Thanks Nic
Glad it works, success with the application !

Nic;o)