PC Review


Reply
Thread Tools Rate Thread

Check box changed event

 
 
Rob Oldfield
Guest
Posts: n/a
 
      13th Aug 2003
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.


 
Reply With Quote
 
 
 
 
Erik Jensen
Guest
Posts: n/a
 
      13th Aug 2003
In your CheckStateChanged event are you working off of
Checkbox myChkbox = (CheckBox)sender ? sounds like its
confused what checkbox its working off of.


 
Reply With Quote
 
Rob Oldfield
Guest
Posts: n/a
 
      14th Aug 2003
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.


"Erik Jensen" <(E-Mail Removed)> wrote in message
news:038101c361cd$6943d930$(E-Mail Removed)...
> In your CheckStateChanged event are you working off of
> Checkbox myChkbox = (CheckBox)sender ? sounds like its
> confused what checkbox its working off of.
>
>



 
Reply With Quote
 
Rob Oldfield
Guest
Posts: n/a
 
      14th Aug 2003

Yup. That's the way I'm already bodging it. Again, was hoping for
something sensible.


"Claes Bergefall" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Turn of the event handler while the user is navigating
> to another record
>
> /claes
>
> "Rob Oldfield" <rob(an a in a circle)realuk.co.uk> wrote in message
> news:(E-Mail Removed)...
> > 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.
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
single occurring event gets changed to reoccurring event =?Utf-8?B?SkdU?= Microsoft Outlook Discussion 4 28th May 2007 06:16 AM
check to see if the value is changed ... 2007-User Microsoft Excel Programming 3 26th Nov 2006 09:13 AM
Check if object handles/is hooked up to a certain type of event/event handler nford@vizual.co.uk Microsoft VB .NET 2 14th Jun 2005 11:58 AM
Check if TextBox changed on leave event richlm Microsoft Dot NET Framework Forms 1 18th Jun 2004 02:51 PM
How To: Check if a cell value has changed Kevin McCartney Microsoft Excel Programming 2 27th Nov 2003 12:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:43 PM.