John J. Mihaljevic <> wrote:
>>> 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. 

Sounds to me that your expecting a control to do what it's not intended to
do.

Take an update button on a form.  Should if fire if you tab over it?  I'll
go out on a limb and say no.  

So what makes you think that the checkbox will flip it's bit by the mere
presence of being highlighted?  




Stephen Russell
DBA / .Net Developer

Memphis TN 38115
901.246-0159

http://spaces.msn.com/members/srussell/

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.12/461 - Release Date: 10/2/2006
 



_______________________________________________
Post Messages to: ProFox@leafe.com
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.

Reply via email to