I have a form with a grid that contains 6 columns. Each of the 6 column's ControlSource is from a view ('vParts_used')created with view designer. The parent table for this is 'Parts_used'. In the designer, the keyid is checked and all fields are checked to be updated and "Send SQL Updates" is checked.
In the Lostfocus event property, for each grid cell, I have the following code:
This all works fine (although I don't understand the need for 2 tableupdates() ) when I modify the fields in the grid the table 'Parts_used' is updated as it should be with no error ..... EXCEPT.
Column 4 has a checkbox in it. When the box is checked (or unchecked) I get "Table buffer for alias "VPARTS_USED" contains uncommitted changes" error.
To troubleshoot this I placed a textbox on the form and ControlSourced it to the same field as the checkbox. If I change the data in it (T/F) and requery() I get the same error. Looking at the Data Session I can see that vparts_used has the change but Parts_used does not. I have added other logical fields to the table and ControlSourced to them but still get the error.
Any idea why this field (logical) cannot be updated?
VFP9 Win 10
Jimmy
In the Lostfocus event property, for each grid cell, I have the following code:
Code:
=TABLEUPDATE()
SELECT parts_used
=TABLEUPDATE()
=REQUERY('vparts_used')
thisform.Refresh
Column 4 has a checkbox in it. When the box is checked (or unchecked) I get "Table buffer for alias "VPARTS_USED" contains uncommitted changes" error.
To troubleshoot this I placed a textbox on the form and ControlSourced it to the same field as the checkbox. If I change the data in it (T/F) and requery() I get the same error. Looking at the Data Session I can see that vparts_used has the change but Parts_used does not. I have added other logical fields to the table and ControlSourced to them but still get the error.
Any idea why this field (logical) cannot be updated?
VFP9 Win 10
Jimmy