>I've tried the following code in the textbox refresh event, but there seems to be a delay as I scroll thru the records.
>
>LOCAL lcAbbrev
>lcAbbrev = TRIM(THIS.value)
>IF !USED("abbrev")
> USE abbrev IN 0
>ENDIF
>SELECT abbrev
>lcAbbrev = LOOKUP(descript, 'COLOR ' + lcAbbrev, abbrev, 'TYPE')
>IF !EMPTY(lcAbbrev)
> THIS.value = lcAbbrev
>ENDIF
>
>
>Kim
Use Seek() instead of Lookup(). Seek() is Rushmore optimizable, Lookup() is not (as VFP Help sais). Try this:
if seek( 'COLOR ' + TRIM(THIS.value), "abbrev", 'TYPE')
this.value=abbrev.descript
endif
And open the database before effectively needed (you can keep it open as long as you need it).
In the above example you don't need to select the area for Abbrev.
Any way, this must be faster then Lookup().
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only