Check box changed event

  • Thread starter Thread starter Rob Oldfield
  • Start date Start date
R

Rob Oldfield

Hi,

I want some code to run when the user changes the check state of a checkbox
on a Windows form. Simple enough. But I don't want that code to run when
the user navigates to record number 2 (given that the value of the checkbox
is different for records 1 and 2).

I've tried both CheckStateChanged and CheckedChanged but they both fire when
moving from record to record. Anyone have a sensible answer as to how to
avoid the code firing in that situation?

Thanks.
 
In your CheckStateChanged event are you working off of
Checkbox myChkbox = (CheckBox)sender ? sounds like its
confused what checkbox its working off of.
 
I don't really understand what you mean here. Don't think it's the problem
though - I only have one checkbox on this particular form.
 
Yup. That's the way I'm already bodging it. Again, was hoping for
something sensible.
 
Back
Top