Glamb,
Presumably, there is a limit to the number of checkboxes you will create on any given instance of the form.
If that's so, an easy solution would be to create the maximum number of checkboxes at design time, and to make them initially invisible. Then, each time you need to add a new client, just make one of the checkboxes visible again.
That way, you will have access to all the properties, events and methods of all the checkboxes at design time, so there will be no problem in knowing where to put the code.
Also, you asked how to implement the "All" checkbox. You need some code similar to the following in its Click event:
Code:
FOR EACH oControl IN Thisform.Controls
IF LOWER(oControl.BaseClass) = "checkbox"
oControl.Value = This.Value
ENDIF
ENDFOR
This wil set every checkbox on the form to the same value as the "All" checkbox. (You would need to modify the code slightly if there were other checkboxes that you didn't want to treat in this way. Aslo, I'm assuming that the checkboxes are placed directly on the form, not in a pageframe or other container.)
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy