If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Why wont this control show whole numbers?
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/For...forms/201002/1 |
#2
|
|||
|
|||
Why wont this control show whole numbers?
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/For...forms/201002/1 . |
#3
|
|||
|
|||
Why wont this control show whole numbers?
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 |
#4
|
|||
|
|||
Why wont this control show whole numbers?
"TonyWilliams via AccessMonster.com" u56994@uwe wrote in message news:a3e015cb5403b@uwe... 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/For...forms/201002/1 |
#5
|
|||
|
|||
Why wont this control show whole numbers?
"TonyWilliams via AccessMonster.com" u56994@uwe wrote in message news:a3e015cb5403b@uwe... 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/For...forms/201002/1 |
#6
|
|||
|
|||
Why wont this control show whole numbers?
"TonyWilliams via AccessMonster.com" u56994@uwe wrote in message news:a3e015cb5403b@uwe... 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/For...forms/201002/1 |
Thread Tools | |
Display Modes | |
|
|