Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box calculation sum needs to be a fixed number. 1

Status
Not open for further replies.

Patentinv

Technical User
Aug 26, 2005
84
US
Hi,
I have a combo box that has a calculation in its after update event procedure that reads = ([TOTFLDSQ] / 4) + 0.4 and it places the sum in a text box called [feltrolls]
Let’s say [TOTFLDSQ] = 33.88 / 4 = 8.47 + 0.4 = 8.87
The [TOTFLDSQ] text box is dynamic per estimate has a different value in it per invoice#/estimate.
The reason I have the + 0.4 is to round up the number, the text box [feltrolls] format set to Fixed. So the value that is displayed is 9 not 8.87 which is correct.

Now in another text box called [totfeltprice] I have a calculation in its control source=[feltrolls]*[feltdollaramt]. [Feltdollaramt] is static it's always the same =$17.00
So the calculation that gets computed in [totfeltprice] is 17 * 8.87
My problem is that I need the calculation to be 17 * 9 not 17 * 8.87.
Is there a way each time the calculation = ([TOTFLDSQ] / 4) + 0.4 gets computed to have the sum set to a whole fixed number like 9?

Thanks—Any help will be greatly appreciated.
 
You can try using "Clng()" to convert to a whole number.
result..
10.40 =10
10.50 =10
10.51 =11

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
Hi ZmrAbdulla,

That works very well,

Thanks--I really appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top