Prior to VFP8, you need to use a subclass of a checkbox that would have your code in it. With VFP8, you could use the BINDEVENT() function to call a delegate object on the CheckBox.Click().
>Hi all,
>
>How do I add some code to the Click Event of the checkbox that I am adding below ?
>
>with thisform.pgf.pgGenerateCIs.grdCIrecs
>
> .recordsource="invtotals"
> .columncount=16
> .visible=.t.
>
> .column1.width=30
> .column1.controlsource="lsendsep"
> .column1.header1.caption="Sep. Inv"
> .column1.readonly=.f.
> if thisform.cntfillgridcirecs=1
> .column1.addobject("chkInclude","checkbox")
> endif
> .column1.currentcontrol="chkInclude"
> .column1.chkInclude.caption=""
> .column1.chkInclude.visible=.t.
> .column1.sparse=.f.
>endwith
>
>Thanks in advance
>Carmel