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
|