From: TonyWilliams via AccessMonster.com on
I have a control that is based on an expression in a query. This is the
expression:
txtaverage: IIf([txtNbrPartsOver1]=0,"0",[SumOftxtnbrparts]/[txtNbrPartsOver1]
)

I have set the format of the control to 0 decimal places but it still shows 2
decimal places not a whole number rounded.
What can I do to force a whole number?
Thanks
Tony

--
Why don't my grey cells communicate with each as fast as they used to? I hate
getting old!

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1

From: Daryl S on
Tony -

You can round the anser as you calculate it:

txtaverage:
Round(IIf([txtNbrPartsOver1]=0,"0",[SumOftxtnbrparts]/[txtNbrPartsOver1]),0)

--
Daryl S


"TonyWilliams via AccessMonster.com" wrote:

> I have a control that is based on an expression in a query. This is the
> expression:
> txtaverage: IIf([txtNbrPartsOver1]=0,"0",[SumOftxtnbrparts]/[txtNbrPartsOver1]
> )
>
> I have set the format of the control to 0 decimal places but it still shows 2
> decimal places not a whole number rounded.
> What can I do to force a whole number?
> Thanks
> Tony
>
> --
> Why don't my grey cells communicate with each as fast as they used to? I hate
> getting old!
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1
>
> .
>
From: TonyWilliams via AccessMonster.com on
Thanks Daryl that worked just fine.
Tony

Daryl S wrote:
>Tony -
>
>You can round the anser as you calculate it:
>
>txtaverage:
>Round(IIf([txtNbrPartsOver1]=0,"0",[SumOftxtnbrparts]/[txtNbrPartsOver1]),0)
>
>> I have a control that is based on an expression in a query. This is the
>> expression:
>[quoted text clipped - 6 lines]
>> Thanks
>> Tony

--
Why don't my grey cells communicate with each as fast as they used to? I hate
getting old!

Message posted via http://www.accessmonster.com