Author: Ken Dibble
Posted: 2016-06-16 at 08:44:59
>>The InteractiveChange() method of this control (fires when the user
>>is typing in the control) will compare THIS.Value to THIS.OldValue
>>and if they are not the same, THIS.Value will be copied to
>>THIS.OldValue, like so:
>>
>>IF THIS.Value <> THIS.OldValue
>> THIS.OldValue = THIS.Value
>>ENDIF
>I don't get why you are checking using the interactivechange method.
>This fires for every character you type in the control. If you want
>to check a date I would use the Valid() or lostfocus() methods so
>you can check the whole date not a half entered date. I only use
>the interactivechange method when doing searches where you want to
>display partial matches.
LostFocus() does not fire unless and until something else gets focus.
There are actions the user can take that result in nothing having
focus, so LostFocus() is not a reliable place to validate
user-entered contents of controls.
My memory is more dim regarding Valid(), but I believe I experimented
with it and could not get it to work the way I wanted. Perhaps I was
trying to display a MessageBox concerning the user's entry and it
would only display a WAIT WINDOW or something. I don't know, but that
decision was made long ago.
Although my decision may seem idiosyncratic, it has worked in
practice, and in theory there is no reason why my use of
InteractiveChange() should cause the error I've seen.
Thanks.
Ken Dibble
www.stic-cil.org
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/E7.67.09039.2DCA2675@cdptpa-oedge02
** 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.