SELECT Count(*) as Howmany FROM cGridSource Where sendEmail INTO CURSOR cDummy >lnSelected = cDummy.Howmany >SELECT Count(*) as Howmany FROM cGridSource Where ! sendEmail INTO CURSOR cDummy >lnNotSelected = cDummy.Howmany >>and used lnSelected and lnNotSelected to display results. I noticed that though the click event was called every time, the displayed resutls were not correct. (Results were off by 1) I put the code in AfterRowColumnChange, and even at multiple places, e.g. checkbox.click + AfterRowColumnChange, hwoever, I never got correct results. Then I made the following change.
lcCode = cGridSource.Code >llSelected = cGridSource.sendEmail >Replace cGridSource.sendEmail WITH llSelected > >SELECT Count(*) as Howmany FROM cGridSource Where sendEmail INTO CURSOR cDummy >lnSelected = cDummy.Howmany >SELECT Count(*) as Howmany FROM cGridSource Where ! sendEmail INTO CURSOR cDummy >lnNotSelected = cDummy.Howmany >>Surprisingly, I always get correct results (The code is only in the Checkbox.click event.) Could someone throw some light on what is happening and what is the correct way of handling this situation. No buffering is used in the form.