Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text1.InteractiveChange Lookup In Table
Message
From
27/02/1998 17:44:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
26/02/1998 14:38:52
Jeff Tucker
Mackinac Center For Public Policy
Midland, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00081082
Message ID:
00081793
Views:
21
>Gil, Thanks. I appreciate your comments. I am back on track. The real stumper now is how to get an incremental search on a date field, since if the whole date is not entered it is invalid, yet incrementalchange fires on each keystroke.
>Jeff
>

That's a tricky one. I usually try to emulate it with keeping the entered part of the date and stuffing it over today. For instance, if today is 26th of Feb, the date would read (in your case) as 022698. Now if user searches for November 13th 1996, I change the value like this

1 122698 26 dec 98
1 112698 26 nov 98
1 111698 16 nov 98
3 111398 13 nov 98
9 111398 13 nov 98
6 111396 13 nov 96

I collect the characters typed into a string and stuff it like this:

* discard delimiters
searchdatestr=stuff( chrt(dtoc(date()),"/.-",""), 1, len(chrtyped), chrtyped)
searchdate=ctod(searchdatestr)

This worked ince in Hungary, because they have a yymmdd date as natural for their lanugage (we use dmy here, also comes out somewhat clumsy). I ended up forcing YMD date for incremental search, and, believe me, users prefer pageup/down or straightforward typing in the date, than incremental search on it. IMHO, incremental search is great for strings, and strings alone.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform