Export to .txt tuncates decimals

C

Chris

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris
 
R

Ronald W. Roberts

Chris said:
I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Look at "User-Defined Numeric Formats" in help.

Create a query and format the field that require decimal points,
then export the query.

Amount: Format(SomeTable.Amt, "##,###.0000")

Look at the format function in help. You can use different characters
in the mask and product different results.

Ron
 
J

John Nurick

Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.
 
C

Chris

-----Original Message-----


Look at "User-Defined Numeric Formats" in help.

Create a query and format the field that require decimal points,
then export the query.

Amount: Format(SomeTable.Amt, "##,###.0000")

Look at the format function in help. You can use different characters
in the mask and product different results.

Ron
--
Ronald W. Roberts
Roberts Communication
(e-mail address removed)
To reply remove "_at_robcom_dot_com"


.

Your suggestion is exactly what Knowledge Base Article -
208408 tells to do. However it does not provide a
solution to my problem.
Respectfully,
Chris
 
G

Guest

-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris
 
J

John Nurick

The idea is that the query should add quotes to the *text fields only*.
Then export the query without adding quotes at that stage (i.e. set the
"Text Qualifier" dropdown in the text export wizard to {None}).

-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris
 
C

chris

Now I get it. Kewl.. it works
Thanks
-----Original Message-----
The idea is that the query should add quotes to the *text fields only*.
Then export the query without adding quotes at that stage (i.e. set the
"Text Qualifier" dropdown in the text export wizard to {None}).
-----Original Message-----
Hi Chris,

You can include the quotes in your query by using calculated fields,
e.g.
fTextField: """" & [TextField] & """"
and then export it without adding quotes at that stage.

On Wed, 17 Dec 2003 06:12:53 -0800, "Chris"

I am trying to export a table to a comma delimited text
file. When the export is complete I notice that number
fields that have been formatted to display 4 decimal
places are truncated when I export the file.

Implemeting the solution offered by Microsoft "Microsoft
Knowledge Base Article - 208408" seems to convert my
number fields into text objects during export.

What I am trying to accomplish is create a text data file
that ONLY encloses my text fields with quotes. This is
the case when I export my table, but the truncation
problem changes my data as in the following example:
"A0A 1B0","AVONDALE","NL",47.41,53.19

The last two fields should be formatted to 4 decimal
places (as they are in my original table).

Creating a query and formatting the number fields to four
places, exports the data to four places but encloses the
fields in quotes as:
"A0A 1B0","AVONDALE","NL","53.1975","47.4162"

What I need is the data file to export the number fields
as numbers NOT characters as;
"A0A 1B0","AVONDALE","NL",53.1975,47.4162

How can this be accomplished???
Thanks,
Chris

Your suggestion seems to add quotes. My situation
requires that I export the decimal fields WITHOUT quotes.
In fact I am already using a format to create the
required number: Format([number_field],"0.0000")

Respectfully,
Chris

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

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