Urgent-format change on output

D

Doug M

Although I have the format of specific fields in a query
set, I lose the formatting when outputing the query
results to a table or external file. The results diplay
correctly when viewed as datasheet, but are changed when
appended to a table or used to create a new table.

How can I prevent this?
 
B

Brian Camire

Use the Format function in an expression in your query to format the values
as text in the desired format.

For example, if you had a numeric field named "Your Field" from a table
named "Your Table" that you wanted to format to four decimal places, you
might enter an expression like this

Your Field: Format([Your Table].[Your Field],"0.0000")

in the Field row of an empty column of the query grid instead of including
the field itself. The "Your Field:" prefix at the beginning of this
expression instructs Access to name the field containing the value of the
expression as "Your Field" in the query results, just like your original
field.

Microsoft Knowledge Base Article 208408 titled "ACC2000: Exporting to Text
File Truncates to Two Decimals Places" at

http://support.microsoft.com/support/kb/articles/q208/4/08.asp

may help explain this in more detail.
 

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