Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursorsetprop() +tablerevert()
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00067244
Message ID:
00067823
Views:
34
>>>What I want to check for, is if the user started to edit some fields before I do the tablerevert() on a newly appended record.
>>Timothy,
>>
>>You need to check out GetFldState(-1) to find out what has been changed or edited by the user on the new record.
>
>Well the prob I'm having is this. A new record is appended with the
>=cursorsetprop("buffering",2), a field is automatically replaced with a control # and then, for testing, I click cmdbutton 'Quit' which has this code in it: ?GETFLDSTATE(-1)
>and the result is '1111111111111111111111' ALL ONES!
>This cannot be right!
Timothy,

Is the command button in a toolbar? If it is then it never gets focus, which means the textbox never loses focus, which means the textbox never updates its controlsource, which means that all 1's is the right answer until the textbox loses focus. The solution, in the command button's click in the toolbar do this before you test getfldstate();

IF TYPE("_screen.activeform.activecontrol.name") = "C"
_screen.activeform.activecontrol.setfocus()
ENDIF

This will force the current control to lose and then regain focus thus updating its controlsource.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform