Jumat, 07 Oktober 2011

RE: [MS_AccessPros] Export a query results to CSV file

 

Hi Leonid

Use the Format() function in a calculated field in your query:

ColumnHeading: Format( [FieldName], "0.000" )

That way, what Access sends to the CSV file is not a number, but formatted
text.

Best wishes,
Graham

> From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of lsyrkin
> Sent: Saturday, 8 October 2011 09:04
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Export a query results to CSV file
>
> Hi All,
>
> I need to export data from a query to a CSV text file in accordance with a
specification that includes different formats of the exported fields. Some
data should be in X.X other X.XXX, etc. where the number of decimal places
after . is most important. I made a query where I specified 'fixed' fomat
and 'decimal places' to match the specification. The query works just fine
and shows me the results exactly as I need to export them. Then I use a
control that calls DoCmd.TransferText for this query with a preliminary
saved export SpecificationName. It does export data but the precision after
the decimal point is changed for 2 both for X.X and X.XXX It is adding
trailing 0 for X.X and truncated X.XXX
>
> I will appreciate any advice in solving this problem. It should be a way
to do that.
>
> Thank you in advance,
> Leonid

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar