% calculated but not to two decimals

B

Ben

I have a very simple calculation
Percent = (i/j) *100
That works, but it doesn't expand to two decimals.

I want it to be something like 99.38%

How can I change the equation above to do that?

Thanks

Ben
 
B

Barry A&P

Ben assuming its a control open properties for the control
Set Field size to decimal
Format to % or fixed depending on how the formula works
Precision 4 or 6 ( F1 for more info on this)
Scale 2
Decimal places 2

in the properties box select a property and hit F1 and a great description
of what the property does will be dispayed.

Cheers
 
F

fredg

I have a very simple calculation
Percent = (i/j) *100
That works, but it doesn't expand to two decimals.

I want it to be something like 99.38%

How can I change the equation above to do that?

Thanks

Ben
How about....

=Format((i/j)*100,"#.00")
 
B

Bob Quintal

I have a very simple calculation
Percent = (i/j) *100
That works, but it doesn't expand to two decimals.

I want it to be something like 99.38%

How can I change the equation above to do that?

Thanks

Ben

It's not the equation that needs changing, it's where (how) you are
storing the result. You are storing the value in a memory variable or
table field which is of integer (or long integder) type.
Change the storage to a double precision type and you will have as meny
decimals as you wish, which you can cut down to the 2 you want with a
format() function.
 
Top