PRB: Current Edit Not Saved with TABLEUPDATE() from ToolbarID: Q139155 3.00 WINDOWS kbprg kbprb The information in this article applies to:
SYMPTOMSUsing the TABLEUPDATE() command in a toolbar command button click event while row or table buffering is enabled does not save the current object's value.
CAUSEWhen you click a toolbar command button, the focus never leaves the object on the form. Therefore, any changes that are made to that object are not sent to the buffer.
RESOLUTIONThe following code sample is very generic and only handles edit and text boxes. The code must be modified for combo boxes and grids containing text boxes, edit boxes, and combo boxes. Note that with combo boxes, you will have to use the DisplayValue instead of Value. Add the following code to the Click event of the Toolbar command button: *-- Code begins here IF ; ENDIF
*-- Code ends here
STATUSThis behavior is by design.
MORE INFORMATIONWhen editing data in a text box, edit box, or combo list box, you must leave the object to force the data to be written to the buffer or table if you are using table or row buffering.
Steps to Reproduce Behavior1. Create a Toolbar Class. 2. Add a command button to the toolbar. 3. In the click event of that command button, add this code:
4. Save and close the toolbar.
5. Create the table. Type the following in the Command window:
6. Create the form:
7. Run the test.
8. Click the Toolbar command button. Notice that the value has changed back
Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbprb
KBSubcategory: FxprgToolbar
|
Last Reviewed: November 13, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |