|
 |
access thread: formatting numbers when exporting
Message #1 by Diane Roberts <Diane.Roberts@c...> on Wed, 05 Sep 2001 09:46:27 -0500
|
|
I am trying to export an ACCESS table to a fixed width file. The
records contain a currency field. No matter what I have tried, this
field comes out left justified without leading zeroes in the exported
output. HELP says you can use the advanced function of the export
wizard to format numbers but I can't figure out how. I have tried
making the field text - nothing helps. There has got to be a solution
that is not occuring to me or more to the wizard than I am finding.
Thanks for any help.
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Wed, 05 Sep 2001 08:15:43 -0700
|
|
One thing to try is to base a query on the table in which you use the
Format$() function to format your fields as desired & then export the query
rather than the table.
HTH,
-Roy
-----Original Message-----
From: Diane Roberts [mailto:Diane.Roberts@c...]
Sent: Wednesday, September 05, 2001 7:46 AM
To: Access
Subject: [access] formatting numbers when exporting
I am trying to export an ACCESS table to a fixed width file. The
records contain a currency field. No matter what I have tried, this
field comes out left justified without leading zeroes in the exported
output. HELP says you can use the advanced function of the export
wizard to format numbers but I can't figure out how. I have tried
making the field text - nothing helps. There has got to be a solution
that is not occuring to me or more to the wizard than I am finding.
Thanks for any help.
Message #3 by Walt Morgan <wmorgan@s...> on Wed, 05 Sep 2001 10:02:03 -0500
|
|
You may wish to try padding a string, e.g. "00000000" and concantenating it
to the value and then take the rightmost of the combined string as dictated
by the field width.
Walt
Message #4 by Diane Roberts <Diane.Roberts@c...> on Wed, 05 Sep 2001 10:42:16 -0500
|
|
Thanks - I was able to make that work.
Message #5 by "John Ruff" <papparuff@c...> on Wed, 5 Sep 2001 08:41:11 -0700
|
|
You need to create a query so that you can format the currency field,
then export to the file based on the query, not the table.
I have a created table called tblCurrency with a field named curCost and
it is currency. I created the following query to provide me with the
leading zeros.
The SQL statement looks like this:
SELECT Format([curCost],"00000000.00") AS MyCost, tblCurrency.curCost
FROM tblCurrency;
Here is the result:
MyCost
curCost
00000050.00
$50.00
00000000.25
$0.25
00000700.00
$700.00
00001000.00
$1,000.00
I hope this helps.
John Ruff - The Eternal Optimist :-)
-----Original Message-----
From: Diane Roberts [ <mailto:Diane.Roberts@c...>
mailto:Diane.Roberts@c...]
Sent: Wednesday, September 05, 2001 7:46 AM
To: Access
Subject: [access] formatting numbers when exporting
I am trying to export an ACCESS table to a fixed width file. The
records contain a currency field. No matter what I have tried, this
field comes out left justified without leading zeroes in the exported
output. HELP says you can use the advanced function of the export
wizard to format numbers but I can't figure out how. I have tried
making the field text - nothing helps. There has got to be a solution
that is not occuring to me or more to the wizard than I am finding.
Thanks for any help.
|
|
 |