A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting Number Of Decimal Places



 
 
Thread Tools Display Modes
  #1  
Old March 14th, 2006, 01:37 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Setting Number Of Decimal Places

Allow me to describe how I would like to set the number of decimal
places displayed in a report. Here is it:

* values in tables are stored to three decimal places
* report prints out to two decimal places
* In some vary rare cases, we actually use three decimal places - in
which case our report formatted to show two decimal places is not
adequate
* I would like to set up the report to display three decimal places,
but only if 3 decimal places are used
* Logically, I would think that you would need to set your query and
report to 3 decimal places, and somehow suppress the 3rd decimal place
if it is "0"

Does that make sense?? Seems simple, but I don't know how to do that.
Off the hop, you would think that if you set the number of decimal
places to "AUTO", that would do the trick - but as we all know, numbers
stores as 26.000 (just for an example) would appear on the report as
26.

Simply stated, my number list would have to look something like this in
my report:

$26.00
$123.45
$87.547
$67.10

Any ideas??

  #2  
Old March 14th, 2006, 03:19 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Setting Number Of Decimal Places

Set the Format property of the textbox to:

0.00#

This should force two decimal places with the third one optional.

--
Wayne Morgan
MS Access MVP


wrote in message
oups.com...
Allow me to describe how I would like to set the number of decimal
places displayed in a report. Here is it:

* values in tables are stored to three decimal places
* report prints out to two decimal places
* In some vary rare cases, we actually use three decimal places - in
which case our report formatted to show two decimal places is not
adequate
* I would like to set up the report to display three decimal places,
but only if 3 decimal places are used
* Logically, I would think that you would need to set your query and
report to 3 decimal places, and somehow suppress the 3rd decimal place
if it is "0"

Does that make sense?? Seems simple, but I don't know how to do that.
Off the hop, you would think that if you set the number of decimal
places to "AUTO", that would do the trick - but as we all know, numbers
stores as 26.000 (just for an example) would appear on the report as
26.

Simply stated, my number list would have to look something like this in
my report:

$26.00
$123.45
$87.547
$67.10

Any ideas??



  #3  
Old March 14th, 2006, 03:24 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Setting Number Of Decimal Places

Use the format command

format(myvalue,"$#,##.00#")

for the above, you get


2 $2.00
22 $22.00
22.1 $22.10
22.11 $22.11
22.111 $22.111

222.111 $222.111
2222.111 $2,222.111
22222.111 $22,222.111

222222 $222,222.00



--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.members.shaw.ca/AlbertKallal


  #4  
Old March 14th, 2006, 02:05 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Setting Number Of Decimal Places

That's great, thanks. It's always something so simple!!

GZ

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO i DISPLAY 2 DECIMAL PLACES WITHOUT HAVING THE NUMBER ROUND Sharonm General Discussions 1 February 28th, 2006 08:13 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Worksheet Functions 23 January 30th, 2006 06:16 PM
number returns only two decimal places after I change from text quale General Discussion 5 December 8th, 2005 08:22 PM
Set number of decimal places in bookmark Ray_Johnson General Discussion 2 August 25th, 2005 09:29 PM
How do I change the number of decimal places displayed in Excel Dan General Discussion 1 February 23rd, 2005 10:31 PM


All times are GMT +1. The time now is 03:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.