Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Number Format - Decimal places.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Justin - 05 Mar 2008 21:23 GMT
I have a system that records attribute data.  An Engineer enters a
specification range for the values and an integer value for the desired
number of decimal places to display.  I have the following formula in my
report's record source

 Round([Act_Value], Nz([Dec_Place],0))

This works to limit the number of decimals, but doesn't "set" the display.  
For example
 [Act_value] = 0.5
 [Dec_place] = 3
The above formula will diplay 0.5.  I want it to display 05.00.

Is there a way to do this?  Any help will be appreciated.
Evi - 05 Mar 2008 22:30 GMT
Use the format function
Format(Round([Act_Value], Nz([Dec_Place],0)),"00.00")
Evi

> I have a system that records attribute data.  An Engineer enters a
> specification range for the values and an integer value for the desired
[quoted text clipped - 10 lines]
>
> Is there a way to do this?  Any help will be appreciated.
John Spencer - 07 Mar 2008 00:41 GMT
To force the number to a string format with the correct number of
characters. You might try the following

FORMAT([Act_Value], "0." & String(Dec_Place,"0"))

'====================================================
 John Spencer
 Access MVP 2002-2005, 2007-2008
 Center for Health Program Development and Management
 University of Maryland Baltimore County
'====================================================

> Use the format function
> Format(Round([Act_Value], Nz([Dec_Place],0)),"00.00")
[quoted text clipped - 14 lines]
>>
>> Is there a way to do this?  Any help will be appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.