PC Review


Reply
Thread Tools Rate Thread

Decimal places using TransferSpreadsheet

 
 
=?Utf-8?B?Y2hlcm1hbg==?=
Guest
Posts: n/a
 
      13th Mar 2006
I use some code to create a query object via code (with another query as the
source). I then use TransferSpreadsheet to export this object as a .xls file.

This works fine, excpet for the decimals in my average field. I have used
the Fixed format in the underlying queries (set to 2 decimals), but this
format does not get transfered to the .xls file. The fixed format does reduce
the decimals down to 2 places when I open the query, but I notice when I
click in the average field, it shows several decimal places.

Is there a way to cut these values down to 2 places or some way to get the
Fixed format to output?

Thanks in advance,
Clint Herman
 
Reply With Quote
 
 
 
 
Ken Snell \(MVP\)
Guest
Posts: n/a
 
      20th Mar 2006
You need to format the data in the query that you export. Use a calculated
field instead of the real field, and use the Format function in that
calculated field to modify the format of the actual field's data to your
desired format.

--

Ken Snell
<MS ACCESS MVP>

"cherman" <(E-Mail Removed)> wrote in message
news:995F590B-BE3A-4511-A695-(E-Mail Removed)...
>I use some code to create a query object via code (with another query as
>the
> source). I then use TransferSpreadsheet to export this object as a .xls
> file.
>
> This works fine, excpet for the decimals in my average field. I have used
> the Fixed format in the underlying queries (set to 2 decimals), but this
> format does not get transfered to the .xls file. The fixed format does
> reduce
> the decimals down to 2 places when I open the query, but I notice when I
> click in the average field, it shows several decimal places.
>
> Is there a way to cut these values down to 2 places or some way to get the
> Fixed format to output?
>
> Thanks in advance,
> Clint Herman



 
Reply With Quote
 
=?Utf-8?B?Y2hlcm1hbg==?=
Guest
Posts: n/a
 
      20th Mar 2006
Perfect! Thank you.

"Ken Snell (MVP)" wrote:

> You need to format the data in the query that you export. Use a calculated
> field instead of the real field, and use the Format function in that
> calculated field to modify the format of the actual field's data to your
> desired format.
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
> "cherman" <(E-Mail Removed)> wrote in message
> news:995F590B-BE3A-4511-A695-(E-Mail Removed)...
> >I use some code to create a query object via code (with another query as
> >the
> > source). I then use TransferSpreadsheet to export this object as a .xls
> > file.
> >
> > This works fine, excpet for the decimals in my average field. I have used
> > the Fixed format in the underlying queries (set to 2 decimals), but this
> > format does not get transfered to the .xls file. The fixed format does
> > reduce
> > the decimals down to 2 places when I open the query, but I notice when I
> > click in the average field, it shows several decimal places.
> >
> > Is there a way to cut these values down to 2 places or some way to get the
> > Fixed format to output?
> >
> > Thanks in advance,
> > Clint Herman

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text box formatted to General Number with 2 decimal places NOTallowing the decimal place. p-rat Microsoft Access Form Coding 3 14th Jan 2008 05:20 PM
Subtracting two 2-decimal place numbers gives result 13-decimal places? tsdutcher@earthlink.net Microsoft Excel Worksheet Functions 5 12th Mar 2007 10:38 PM
Re: conditionally round decimal numbers from 8 places to 6 places John Nurick Microsoft Access Queries 0 16th Jan 2007 09:22 PM
Re: conditionally round decimal numbers from 8 places to 6 places John Spencer Microsoft Access Queries 0 16th Jan 2007 08:54 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. =?Utf-8?B?U1VLWUtJVFRZ?= Microsoft Excel Misc 3 6th Jul 2005 01:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:30 PM.