PC Review


Reply
Thread Tools Rate Thread

Access losing number format when outputting to Excel

 
 
slickdock
Guest
Posts: n/a
 
      21st Jul 2009
I have an MSAccess report whose property is =Sum([Amount]). I formatted it as
Standard with 2 decimal places and it looks perfect in msAccess. Examples:
100.00
0.00
35.42

When I use msAccess' OutputTo Excel feature, the amount column looks like
this:
100
0
35.42

What am I doing wrong? I don't want the users to have to do additional work
when it outputs to Excel. How can I make it output from msAccess properly?

Thanks in advance.
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      21st Jul 2009
It is exporting properly. Access is using a format to control the display of
the data. If you want the data displayed that way in EXCEL then Excel needs
to use a format to control the display of the data.

There is really nothing you can do except...
I don't know if this will work, but you can try changing the control source to
=Format(Sum(Amount),"#,##0.00")

It is possible that Access will then see this value as a string and export it
correctly. I don't think it will work, but you can try it and see.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

slickdock wrote:
> I have an MSAccess report whose property is =Sum([Amount]). I formatted it as
> Standard with 2 decimal places and it looks perfect in msAccess. Examples:
> 100.00
> 0.00
> 35.42
>
> When I use msAccess' OutputTo Excel feature, the amount column looks like
> this:
> 100
> 0
> 35.42
>
> What am I doing wrong? I don't want the users to have to do additional work
> when it outputs to Excel. How can I make it output from msAccess properly?
>
> Thanks in advance.

 
Reply With Quote
 
ryguy7272
Guest
Posts: n/a
 
      21st Jul 2009
I already answered this in the Excel Programming DG.
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"John Spencer" wrote:

> It is exporting properly. Access is using a format to control the display of
> the data. If you want the data displayed that way in EXCEL then Excel needs
> to use a format to control the display of the data.
>
> There is really nothing you can do except...
> I don't know if this will work, but you can try changing the control source to
> =Format(Sum(Amount),"#,##0.00")
>
> It is possible that Access will then see this value as a string and export it
> correctly. I don't think it will work, but you can try it and see.
>
> John Spencer
> Access MVP 2002-2005, 2007-2009
> The Hilltop Institute
> University of Maryland Baltimore County
>
> slickdock wrote:
> > I have an MSAccess report whose property is =Sum([Amount]). I formatted it as
> > Standard with 2 decimal places and it looks perfect in msAccess. Examples:
> > 100.00
> > 0.00
> > 35.42
> >
> > When I use msAccess' OutputTo Excel feature, the amount column looks like
> > this:
> > 100
> > 0
> > 35.42
> >
> > What am I doing wrong? I don't want the users to have to do additional work
> > when it outputs to Excel. How can I make it output from msAccess properly?
> >
> > Thanks in advance.

>

 
Reply With Quote
 
slickdock
Guest
Posts: n/a
 
      21st Jul 2009
Thank you, but you're right...it didn't work. What I was able to do, since
the answer below was too complicated for me, was simply create a query that
summed the numbers, then link that query to my final query. That allowed me
to remove the =Sum([amount]) from the report, and simply use [amount] in the
report, which I am able to format as fixed, with 2 decimals. Now it exports
the way I want it in excel.

I also don't know how to post once with a "cc" to another group, so that I
don't post the same question twice. Can you help?

Thank you.

"John Spencer" wrote:

> It is exporting properly. Access is using a format to control the display of
> the data. If you want the data displayed that way in EXCEL then Excel needs
> to use a format to control the display of the data.
>
> There is really nothing you can do except...
> I don't know if this will work, but you can try changing the control source to
> =Format(Sum(Amount),"#,##0.00")
>
> It is possible that Access will then see this value as a string and export it
> correctly. I don't think it will work, but you can try it and see.
>
> John Spencer
> Access MVP 2002-2005, 2007-2009
> The Hilltop Institute
> University of Maryland Baltimore County
>
> slickdock wrote:
> > I have an MSAccess report whose property is =Sum([Amount]). I formatted it as
> > Standard with 2 decimal places and it looks perfect in msAccess. Examples:
> > 100.00
> > 0.00
> > 35.42
> >
> > When I use msAccess' OutputTo Excel feature, the amount column looks like
> > this:
> > 100
> > 0
> > 35.42
> >
> > What am I doing wrong? I don't want the users to have to do additional work
> > when it outputs to Excel. How can I make it output from msAccess properly?
> >
> > Thanks in advance.

>

 
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
import from excel to access without losing format Sandy Microsoft Access External Data 2 21st Feb 2008 12:09 AM
Re: Value change when outputting to Excel (Access 2003) John Bartley K7AAY Microsoft Access Macros 2 23rd Jan 2008 06:44 PM
Re: Value change when outputting to Excel (Access 2003) pcbutts1 Microsoft Access Getting Started 0 23rd Jan 2008 03:01 AM
Value change when outputting to Excel (Access 2003) John Bartley K7AAY Microsoft Access Getting Started 1 22nd Jan 2008 06:50 PM
Can I format cells when outputting to excel? Stapes Microsoft Access 1 7th Sep 2007 03:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 PM.