Solved How to format the numbers dropping below 1 but zero?

prabha_friend

Prabhakaran Karuppaih
Local time
Tomorrow, 01:20
Joined
Mar 22, 2009
Messages
934
1 has to be 1 (No Decimals Needed)
-1 has to be -1 (No Decimals Needed)
but
1.25 has to be 1.250 (Three Decimals Need only for the values dropping below 1 but zero)

Thanks for reading. Please reply.

With Hope,
Prabhakaran
 
To say it short, We can say like this: "How to format the positive decimal places in ms access"
 
1 has to be 1 (No Decimals Needed)
-1 has to be -1 (No Decimals Needed)
but
1.25 has to be 1.250 (Three Decimals Need only for the values dropping below 1 but zero)

Thanks for reading. Please reply.

With Hope,
Prabhakaran
Since when has 1.25 been dropping below 1? :(
I cannot make head or tail of what you want.:(
Perhaps use the Int() function ?
 
Since when has 1.25 been dropping below 1? :(
I cannot make head or tail of what you want.:(
Perhaps use the Int() function ?
Good Question. Sorry. Almost sleeping.

I just want 3 digits after the decimal separator, only if the actual value is been entered with atleast a single decimal value after the decimal separator.

12 as 12
1 as 1
but
1.2 as 1.200
1.25 as 1.250
1.5 as 1.500

like the above numbers...
 
I don't want to change the values (by using int( ) ). But just want to show using the format codes. Possible?
 
You need a Format call:


Inside an IIF statement:


Where you test to see if the original number is equal to its Int() value:

 
SQL:
Sales_Qty: IIf([Sales_Item_Unit_Qty]=Int([Sales_Item_Unit_Qty]),[Sales_Item_Unit_Qty],Format([Sales_Item_Unit_Qty],"#.000"))
 
You need a Format call:


Inside an IIF statement:


Where you test to see if the original number is equal to its Int() value:

Thanks Plog
 

Users who are viewing this thread

Back
Top Bottom