How to trigger exiting script from an action

Hello Everyone:

I need to set the value of a few fields on a form. If the user moves into the fields and manually enters the values there is no problem because in entering it runs some code and when exiting it runs some more code. Now I need to set some buttons (actions) that will fill the value on these fields on one click. The problem I am having is that in the action I do not run the entering or exiting code and then the end result is not correct. Is there any way to trigger this code from my action buttons ???

Thanks

Subject: RE: How to trigger exiting script from an action

Yes, you could place the cursor in the fields in question using NotesUIDocument methods and then move it out. But that’s sort of silly. Why not just create subroutines in the globals of the form to do the calculations, and call those subroutines from two places – the field events and the action?