Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling code
Message
 
To
11/11/1998 16:27:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00156775
Message ID:
00157012
Views:
29
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
Previous
Reply
Map
View

Click here to load this message in the networking platform