In the grand scheme of things, considering that a checkbox can only show a binary value, the "proper way" (IMO) to handle values in the checkbox, is not to allow focus (via .When) in the first place (in this case), based on the current context (which is apparently dictating what the value of the checkbox should be, and should set accordingly).
Your case is "not logical" (or user friendly), IMO.
Assuming, of course, that you are not triggering some process by a flick of the checkbox which will ultimately dictate the final (valid) value in the checkbox ... but since it is deterministic, should be a simple case for the program to set (and then possible disable) ... instead of letting the user toggle it ... until they get it right.
In either case, I don't see the problem.
>On a CheckBox, if you put a RETURN .F. or 0 into the Valid
>you can to leave the checkbox.
>
>The possible workaround is to put a NODEFAULT into the LostFocus,
>but this cut the code when you leave the form
>form.LostFocus
>form.Deactive
>are not fired.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement