I have designed a form programatically as in the example vfp gives in the addobject help section. This is most of the prg I have. Problem is after I enter a new value, it gets saved to the mem variable ok but when I run the prg immediately afterward, the old value keeps appearing in the textbox.
frmMyForm.AddObject('ctbox1','TBOXyes')
restore from l:gooddate.mem addit && var is mgooddate
DEFINE CLASS tboxyes AS textbox && Create Command button
value = mgooddate
Left = 50 && Command button column
Top = 100 && Command button row
Height = 25 && Command button height
width=49
inputmask='99999'
PROCEDURE keypress
para nkeycode,hello
if nkeycode=13
mgooddate=allt(thisform.cmdCmndBtn1.value)
save all like mgooddate to l:gooddate
releas cmdyes,cmdCmndBtn1
release mgooddate
rest from l:gooddate.mem addit
CLEAR EVENTS && Stop event processing, close Form
release thisform
endi
ENDDEFINE
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."