How format function to round off figures
Hi
Is there a way to round off figures in ms access with the format function , for example
9.333 X 15.1111 = 141.0318963 now if I round off on the format property of a form to 2 decimal places it gives me 141.03 , my control on the other subform require the users to balance off with this 141.0318963, if it does not balance off then the data on the form cannot be saved.
Because of the decimals remaining the data cannot be saved , then how do I format both controls so that if the users captures 141.03 not 141.0318963 the data can be saved
Regards
Chris
Is there a way to round off figures in ms access with the format function , for example
9.333 X 15.1111 = 141.0318963 now if I round off on the format property of a form to 2 decimal places it gives me 141.03 , my control on the other subform require the users to balance off with this 141.0318963, if it does not balance off then the data on the form cannot be saved.
Because of the decimals remaining the data cannot be saved , then how do I format both controls so that if the users captures 141.03 not 141.0318963 the data can be saved
Regards
Chris
ASKER
Now if the round off number amountToPay=Round(141.0318 963,2)-->1 41.03 if I subtract with 141.03 are you sure it wont leave some points?????
Regards
Chris
Regards
Chris
ASKER
Maybe I'm not clear here , what I want is that if the difference is between -0.5 and 0.50 then let the data maybe saved
If diff.txt ( between -1And 1) Then
MsgBox " Please clear the difference"
Cancel = True
Exit Sub
End If
End Sub
Now I'm not sure how the above can be polished up to work, please check.
Regards
Chris
If diff.txt ( between -1And 1) Then
MsgBox " Please clear the difference"
Cancel = True
Exit Sub
End If
End Sub
Now I'm not sure how the above can be polished up to work, please check.
Regards
Chris
Use the Format property on both numbers in the comparison?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
e.g.Open in new window