I’m not sure I’m getting the drift of what you are trying to do so please take the following for what its worth; if any.

Code:
;Test Sample partial code for KixForm - trouble passing data to/from variables - Out of sync ! 
setoption("NoVarsInString","on")
setoption("WrapAtEOL","on")
debug on
? "Test"
$TBN = "$VARIABLE1"
$TX1 = "1st-Text"
; Partial Form Code
$_ = execute("$$#$TBN = $$PForm.TextBox()")
$_ = execute("$$#$TBN.MaxLength = 10")
? ?
$_ = execute("$$#$TBN.Text = $$TX1")
? $VARIABLE1.Text
$_ = execute("$$#$TBN.Text = '2nd-Text'")
? $VARIABLE1.Text
$_ = execute("$$#$TBN.Text = '3rd-Text'")
? $VARIABLE1.Text
;other code
;$VARIABLE1.Text = "3rd-text"
;$_ = execute("$$txt = $$TBN.TEXT")
;$_ = execute("$$txt = $$#$TBN.TEXT")
;$_ = execute("$$#$txt = $$TBN.TEXT")
;$_ = execute("$$#$txt = $$#$TBN.TEXT")
;? "#3=" $txt
;? "#4=" $VARIABLE1.TEXT
$A = len($txt)
? $A
debug off
exit

_________________________
Box
FACTA NON VERBA