I suggest that you create a method on your form. For example, if the basic function of the code you want to run is to validate the data on the form, you could create a method called ValidateData. In the click events of the two buttons, you would then call THISFORM.ValidateData(). This strategy makes debugging and maintenance a lot easier.
Hope this helps!
-Brien
>I have code that works in a button on a form and that code needs to
>be executed at another time as well. Writing the code twice seems to me to be asking_ for trouble. Can I just call the code from that button with something like formx.buttony.click from another button?
>
>
>TIA
>chris
Brien R. Givens
Brampwood Systems