Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetFldState and Alias not found troubles
Message
 
To
21/10/1997 09:36:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055703
Message ID:
00055952
Views:
40
>Depending on which field I changed originally, it shows up in a different column. And, yes, it still shows up immediately after tableupdate(). An interesting point, if I change 2 fields and save, it changes the 2 corresponding to the first field to a 1, but no matter how many times I save, the last changed field never has its status changed in getfldstate(-1). And the record REALLY is saved! If I exit the form and go back in, all of my changes are there. BTW, this is not an issue where eval(this.controlsource) <> this.value. I handle that before invoking my save method.
>
>So, what do you think?
>
>Marcia
Marcia,

I'll bet your save button is in a toolbar, right? Well toolbars never get focus, that means that the textbox never lost focus, and the textbox updates its controlsource when it loses focus. So your tableupdate is fired and it updates without the textbox value of the last textbox. Then the textbox loses focus and it updates its controlsource and you have a dirty buffer. The solution, well you did want the answer too didn't you?

In the click of the toolbar button pout this before you tableupdate;

IF TYPE("_screen.activeform.ActiveControl.Name") = "C"
_screen.activeform.ActiveControl.SetFocus()
ENDIF
* The rest of the code here
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform