Exporting Qry to text

P

phuser

I am exporting a qry to a text file (*.asc) and keep loosing the right
alignment in currency fields, I need to keep the 0.00 format as well.
 
J

Jeanette Cunningham

Hi,
use a calculated field in the query. Export the calculated field in place of
the field.

In the Field row in a new column of the query type:
expr1: Format([Amount],"$0.00")

Replace expr1 with a name for the calculated field.
Replace Amount with the name of your currency field.


Jeanette Cunningham
 
K

Klatuu

You can't really specify right justified formatting when exporting to a text
file; however, here is a trick you can try. First, you need to determine
what the widest the field could possibly be. In this example, we will assume
it is 12 characters. So, use a calculated field in your query with an
experession like this. It will always return a string 12 characters long:

FixedField: Space(12-Len(Format([TheField],"0.00"))) &
format([TheField],"0.00")

Change the 12 to whatever length is appropriate for you.
[TheField] would be the name of the field you need to export this way.
 
K

Klatuu

Sortof. Keeps the 0.00 format, but doesn't right justify.
See my previous post on this.
--
Dave Hargis, Microsoft Access MVP


Jeanette Cunningham said:
Hi,
use a calculated field in the query. Export the calculated field in place of
the field.

In the Field row in a new column of the query type:
expr1: Format([Amount],"$0.00")

Replace expr1 with a name for the calculated field.
Replace Amount with the name of your currency field.


Jeanette Cunningham



phuser said:
I am exporting a qry to a text file (*.asc) and keep loosing the right
alignment in currency fields, I need to keep the 0.00 format as well.
 
P

phuser

Awesome, thanks so Much!!

Been working on this thing for a week, appreciate the help

Pauline

Klatuu said:
You can't really specify right justified formatting when exporting to a
text
file; however, here is a trick you can try. First, you need to determine
what the widest the field could possibly be. In this example, we will
assume
it is 12 characters. So, use a calculated field in your query with an
experession like this. It will always return a string 12 characters long:

FixedField: Space(12-Len(Format([TheField],"0.00"))) &
format([TheField],"0.00")

Change the 12 to whatever length is appropriate for you.
[TheField] would be the name of the field you need to export this way.
--
Dave Hargis, Microsoft Access MVP


phuser said:
I am exporting a qry to a text file (*.asc) and keep loosing the right
alignment in currency fields, I need to keep the 0.00 format as well.
 
D

Dale Fye

Or:

Right(Space(12) & Format([TheField], "0.00"), 12)

--

email address is invalid
Please reply to newsgroup only.



Klatuu said:
You can't really specify right justified formatting when exporting to a text
file; however, here is a trick you can try. First, you need to determine
what the widest the field could possibly be. In this example, we will assume
it is 12 characters. So, use a calculated field in your query with an
experession like this. It will always return a string 12 characters long:

FixedField: Space(12-Len(Format([TheField],"0.00"))) &
format([TheField],"0.00")

Change the 12 to whatever length is appropriate for you.
[TheField] would be the name of the field you need to export this way.
--
Dave Hargis, Microsoft Access MVP


phuser said:
I am exporting a qry to a text file (*.asc) and keep loosing the right
alignment in currency fields, I need to keep the 0.00 format as well.
 
N

noreply@noreply

LACONIA, N.H.-A Gilmanton, New Hampshire, man charged with striking and lucre his somebody someone with a snowplow-equipped restorative truck will go on tryout succeeding month.Twenty-eight-year-old Ryan Benson is live with inattentive homicide in the demise of 25-year-old Gerry Vayda, who was struck spell close base in Alton on New Twelvemonth's Eve 2006. Authorities say Benson was dyslectic by drugs Lineage2 adena[/url:29pr2ijj], but his collection attorney successfully argued to jazz a blood-alcohol trial performed on Benson that period kept out of information.Jury action is set to begin Sept. 15 in Belknap County Patronizing (http://wowgold6583.movilblog.mobi/archives/15:29pr2ijj)
 
Top