Why wont this control show whole numbers?

  • Thread starter TonyWilliams via AccessMonster.com
  • Start date
T

TonyWilliams via AccessMonster.com

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
 
D

Daryl S

Tony -

You can round the anser as you calculate it:

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

TonyWilliams via AccessMonster.com

Thanks Daryl that worked just fine.
Tony

Daryl said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top