Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about textboxes' lostfocus()
Message
From
23/05/2004 23:57:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
23/05/2004 23:24:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00906364
Message ID:
00906387
Views:
17
>ohhh i'm sorry.. when user enters a different date in the txttodate.
>
>initially user enters txtfrdate. at lostfocus(), i set txttodate value to txtfrdate. but my user can or may change the value of txttodate.
>
>if i type 05212004 in txtfrdate, txttodate changes too as txtfrdate loses focus. when i type only 0524 at txttodate, then press the save button (=tableupdate(.t.), value of txttodate changes back to the value of txtfrdate. but if i type 05242004 in txttodate, txttodate becomes 05242004.

I would change the value of TxtToDate only once, in TxtFromDate.LostFocus(); and then leave it. Something like this:
* TxtFromDate.LostFocus()
if empty(ThisForm.TxtToDate.Value) or ThisForm.TxtToDate.Value < This.Value
  ThisForm.TxtToDate.Value = This.Value
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform