=> -----Original Message----- => From: [EMAIL PROTECTED] => [mailto:[EMAIL PROTECTED] On Behalf Of John J. Mihaljevic => Sent: Wednesday, October 04, 2006 13:04 => To: [email protected] => Subject: RE: Forcing the Valid event in a checkbox => => > > I've got a checkbox in a form with a Valid event. When the user => > > simply tabs over the checkbox, the Valid event isn't => triggered. How => > > can I force that event to be triggered? Is there a way => to force a => > > Valid event? Or should I put that code elsewhere in the => checkbox? => > => > What are you trying to validate? If you just want to => tap into the => > checkbox losing focus, perhaps the LostFocus() event will do? => => I'm enabling or disabling several textboxes on the form => depending on the value of the checkbox. Here's a chunk of => the Valid code: => => if thisform.pageframe1.page1.chkfinished.value=.t. => thisform.pageframe1.page1.txtpartnumber.enabled=.t. => thisform.pageframe1.page1.txtdiameter.enabled=.f. => else => thisform.pageframe1.page1.txtpartnumber.enabled=.f. => thisform.pageframe1.page1.txtdiameter.enabled=.t. => endi => => If I physically click the checkbox (chkfinished), the code => executes. When the box is checked, txtpartnumber is enabled => and txtdiameter is disabled. => And when the box is unchecked, txtpartnumber is disabled and => txtdiameter is enabled. But when just tabbing across the => field (not changing it by clicking on it or tapping the => space bar), the code doesn't execute. => => I've tried this code in both the Valid method and the => LostFocus method. => => Any other ideas? => => Thanks! => => John =>
Am I missing something here? If the value of the checkbox does not change when you are "passing through," why would you want to validate it? You validated it the last time it was changed or initialized. I am sorry, but I don't see what the problem is? If you want to prove that nothing happened, capture the value in gotfocus and compare it to the current value in lostfocus. I think. Also, your code is too complex. Txtpartnumber is always equal to chkfinished and txtdiameter is alwas equal to NOT(chkfinished). 2 lines is all you need instead of the 7 you are using. HALinNY _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

