Steve,
I haven't been following your recent discussions with Chris in detail, so my apologies if what I am about to say has already been covered. But I have been thinking about your original question, and it occurs to me that there might be a simpler solution.
Let's start from the premise that you have 24 very similar textboxes (I assume these are the 24 boxes under the heading "Min" in your "Blind Levels" form) and also that these are all based on the native VFP textbox class, that is, you have not created a custom class for them. You now want to add the same code to one of the methods (the Valid, in this case) of all 24 boxes.
Here's what I perhaps should have suggested in the first place:
1. In the form designer, select the first of the textboxes. Add the relevant code to its Valid event. Test the code to your satisfaction.
2. Back in the form designer and again with the first textbox selected, select Save As Class from the File menu.
3. In the resulting dialogue, select "Selected controls"; enter a name for the class (for example, txtMin); specify a name for the class library (if you already have a suitable class library, navigate to it here, otherwise invent a name, for example, Controls).
4. Add the class library (the one that you created or specified above) to the Classes tab of your project. Within the project, drill down into the class library so that you can see the name of the txtMin class.
5. Now delete all 24 text boxes. (You did back up the form before you started?)
6. Drag the txtMin class from the class library in the project manager onto the form, in place of the first of the textboxes.
7. Repeat for the other 23 boxes.
You should now have 24 textboxes, all containing the same Valid code. They will be named something like txtMin1, txtMin2, etc., which you might want to alter. All their properties and method code will be identical, except for obvious things like their Left, Top, Width, etc.
If at any point you want to make a change to all 24 boxes (you might later decide that want to modify the Valid code, for example), open the class in the class designer and make the change there. The 24 controls on the form will immediately inherit that change.
I hope this makes sense. Of course, if you have already found another solution with Chris's help, that's fine - go for it. I also take Chris's point that a grid might have been a better interface in this case. However, I hope the above suggestion will give you something to think about, and also that it might be useful for other people in a similar situation.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads