Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox showing old value
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00643700
Message ID:
00643852
Views:
8
>My advise would be not to use .MEM files. Store data in the table, INI file or registry, whatever is better for you.
Sergey I just converted it to a table and I get the same results. Prob lies in my "value = mgooddate" statement, I think but can't figure it out

>
>
>>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."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform