*-- this code is being called from the valid of a textbox
*-- I don't understand why VFP doesn't understand the context here
*-- the setfocus() occurs in the init() of
*-- the icmkitlookupplacement form
if seek(this.value,'kit_child','cplacement')
return .t.
else
do form (FORMSPATH+'icmkitlookupplacement') with this.value to lcRetval
if vartype(lcRetval)='L'
*-- don't do anything
else
this.value=lcRetval
this.refresh()
endif
endif
>I am receiving the error:
>
>Cannot call setfocus() from within a when, valid, rangehigh or rangelow.
>
>BUT - I am calling the setfocus in my form's init() method!!
>This has me COMPLETELY confused. I always call setfocus() from my form's init. How can this be happening?
>
>TIA