Keep trailing zero in ms access for generating reports
Hi, I am working with ma access and i have a numeric field in which there are decimal digits for only few data. Say 1 out of 10 times but i don't wont to show .00 when the number is integer. I just want to show the numbers with decimal points like 5.02 with decimal digits as it may become important. Please help. How do i achieve this?:rolleyes:
Re: Keep trailing zero in ms access for generating reports
Quote:
Originally Posted by
Noverism
i don't wont to show .00 when the number is integer. I just want to show the numbers with decimal points like 5.02 with decimal digits
Well i'm not too much sure but you can set the format property to The result for the integer suppose five will be "5." and the decimal number will be "5.12" or "5.04"
Re: Keep trailing zero in ms access for generating reports
What would happen if i use control source expression to get the desired output :
=Iff(thefield = Int(thefield), Format(thefield,"0"),
Format(thefield, "0.00")
or may be this :
=Iff(thefield = Int(thefield), Format(thefield,"0"),
Format(thefield, "0.0#")
Re: Keep trailing zero in ms access for generating reports
Quote:
Originally Posted by
Noverism
=Iff(thefield = Int(thefield), Format(thefield,"0"),
Format(thefield, "0.00")
or may be this :
=Iff(thefield = Int(thefield), Format(thefield,"0"),
Format(thefield, "0.0#")
This will not work... This is a typo i guess its IIF :biggrin: else everything is fine! :thumbup1: