How do I remotely trigger the calculation of a text box

Our office is using a finance application. It contains a big worksheet to calculate the pay for a given employee. It contains different variables for benefits calculation. I wrote a program to directly modify the database field values directly. But the problem is that the screen contains the logic to calculate the final calculation.
When I re-open the screen after changing values in the database, I can see the values changed but the calculation is still old. If I click on a field and press the tab key, the form re-calculates the value. Is it possible to write a simple tool to automate the process on a click of a button?
