Home All Groups Group Topic Archive Search About
Author
20 Feb 2006 3:25 PM
JJ
Can you force a control to carrying out its validating code without having
to leave/change focus  - i.e. raise its validating event ?

Author
20 Feb 2006 3:55 PM
Chris
JJ wrote:
> Can you force a control to carrying out its validating code without having
> to leave/change focus  - i.e. raise its validating event ?
>
>

When do yo want to validate it if not when you are leaving/entering?
Something has to trigger it.  Keypress?

Chris
Author
20 Feb 2006 4:13 PM
JJ
The problem I have is that a user can click on a menu and save the file when
there are unwanted chars in the text box. The text box doesn't seem to lose
focus during this time .
If I could get the 'save' command to force validation before it tries to
save that would help.


Show quoteHide quote
"Chris" <no@spam.com> wrote in message
news:ezCjyXjNGHA.2528@TK2MSFTNGP12.phx.gbl...
> JJ wrote:
>> Can you force a control to carrying out its validating code without
>> having to leave/change focus  - i.e. raise its validating event ?
>>
>>
>
> When do yo want to validate it if not when you are leaving/entering?
> Something has to trigger it.  Keypress?
>
> Chris
Author
20 Feb 2006 4:34 PM
Chris
JJ wrote:
Show quoteHide quote
> The problem I have is that a user can click on a menu and save the file when
> there are unwanted chars in the text box. The text box doesn't seem to lose
> focus during this time .
> If I could get the 'save' command to force validation before it tries to
> save that would help.
>
>
> "Chris" <no@spam.com> wrote in message
> news:ezCjyXjNGHA.2528@TK2MSFTNGP12.phx.gbl...
>
>>JJ wrote:
>>
>>>Can you force a control to carrying out its validating code without
>>>having to leave/change focus  - i.e. raise its validating event ?
>>>
>>>
>>
>>When do yo want to validate it if not when you are leaving/entering?
>>Something has to trigger it.  Keypress?
>>
>>Chris
>
>
>

In your save routine whey not just call the function that does your
validation, if the validation fails then yell at them?

Chris
Author
20 Feb 2006 6:43 PM
JJ
Thanks Chris.

I did this in the end.


Show quoteHide quote
"Chris" <no@spam.com> wrote in message
news:%23prRutjNGHA.3984@TK2MSFTNGP14.phx.gbl...
> JJ wrote:
>> The problem I have is that a user can click on a menu and save the file
>> when there are unwanted chars in the text box. The text box doesn't seem
>> to lose focus during this time .
>> If I could get the 'save' command to force validation before it tries to
>> save that would help.
>>
>>
>> "Chris" <no@spam.com> wrote in message
>> news:ezCjyXjNGHA.2528@TK2MSFTNGP12.phx.gbl...
>>
>>>JJ wrote:
>>>
>>>>Can you force a control to carrying out its validating code without
>>>>having to leave/change focus  - i.e. raise its validating event ?
>>>>
>>>>
>>>
>>>When do yo want to validate it if not when you are leaving/entering?
>>>Something has to trigger it.  Keypress?
>>>
>>>Chris
>>
>>
>>
>
> In your save routine whey not just call the function that does your
> validation, if the validation fails then yell at them?
>
> Chris