These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

need help with "simple" calculation

wislndixie
Registered: Oct 3 2006
Posts: 125

I have a text box with a simple calculation as follows: weeklycheck*52/12
When I enter a value into my textbox it of course multiplies the value times 52 and divides by 12. My calculation calculates correctly. The problem is after I tab away from the text box into another text box it calculates again. In other words, each time I tab it triggers the calculation in my text field. How do I prevent this?
Mike

My Product Information:
Acrobat Pro 9.4, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
A calculation should only be triggered when a field value in any field changes. Is this what you're seeing, or are you saying the the calculation is triggered merely by tabbing from one field to another, without the value changing? Normally, calculated fields should be set to read-only, so a user does not attempt to interact with it.
wislndixie
Registered: Oct 3 2006
Posts: 125
The field value is changing each time I tab. What I'm trying to do is to facilitate an employee converting his weekly pay check value to a monthly value. So, they need to be able to enter their weekly check amount into the text box and it converts it by calculation into a monthly amount. The calculation works perfectly within the text box but each time I tab, it recalculates itself.
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
OK. You should not use the Calculate event for this, but rather the Validate event, or perhaps the Format event if you just want to change how the underlying value gets displayed without changing the field value.

Another alternative is to use separate field for the weekly check amount and the monthly amount, where the monthly amount gets calculated.
wislndixie
Registered: Oct 3 2006
Posts: 125
Ok, I'll try your solutions..most likely using a separate field for the weekly check amount.
wislndixie
Registered: Oct 3 2006
Posts: 125
George_Johnson wrote:
OK. You should not use the Calculate event for this, but rather the Validate event, or perhaps the Format event if you just want to change how the underlying value gets displayed without changing the field value.Another alternative is to use separate field for the weekly check amount and the monthly amount, where the monthly amount gets calculated.
Thanks George, I used the separate field to complete my calculations and it works perfect now.
Thanks,
Mike