Hello Tracy
maybe i missunderstood you, but why don't you pass an object reference to the function, something like this:
Return(RPMVALID(ab_rela, this))
func RPMVALID
LPara ;
ValueToValidate, ;
ObjPointer
Local ;
ReturnValue
if ...validate, validate, validate = .t.
ObjPointer.Value = CHR(25) + LEFT(m.whatrelation,10)
ReturnValue = .t.
else
ReturnValue = .f.
endif
return(ReturnValue)
endfunc
>I have a form that replaces an FPD26 screen. In the old dos screen textbox's valid, code as below was run:
>
>
>RETURN rpmvalid(ab_rela)
>
>
>rpmvalid would validate the value of ab_rela and if not valid, provide a popup screen to select a valid value. The valid value selected from the popup screen was returned to the textbox via:
>
>KEYBOARD CHR(25) + LEFT(m.whatrelation,10)
>
>In the VFP form's valid method, this is not working. IF I use something similar to:
>
>
>llreturn=RPMVALID(ab_rela)
>IF llreturn
> RETURN .T.
>ELSE
> RETURN 0
>ENDIF
>
>
>Then the next control's value following the textbox is populated with the keyboard buffer's data due to the RETURN .T. or RETURN 1. If I RETURN 0 if llreturn is .T. to stuff the textbox's value with the data in the keyboard buffer returned from the popup then of course I am stuck in the textbox control infinitely. I need to grab the value in the keyboard buffer and store it to the textbox's value and return .t. somehow. I can only see how to determine if the keyboard buffer has a value, not grab what it is using CHRSAW(). Any ideas?
>
>TIA,