>>>Hi everybody,
>>>
>>>We have a form with a pageframe with 9 pages. One of the pages called pageAction, that has a cntAction on it. There is a button called Name Search in this container.
>>>
>>>Here is a code snippet from that button:
>>>
>>>
>>>*** Update status code
>>>
>>> thisform.cntMainInfo.cboStatusCodes.displayvalue = m.lcNewStatusCode
>>> thisform.lStatusCodeChanged = .T.
>>> thisform.oBizObj.lCascadeMessages = .F.
>>>
>>> if m.llRetVal and thisform.oBizObj.save() = FILE_OK
>>>
>>>E.g. we set displayvalue of the combobox that belongs to the container on the form itself (this container is located bellow the pageframe) and then save the data. I also would like to mention that the lcNewStatusCode is a system status code that is displayed in the combobox as disabled item.
>>>
>>>Now, when we try to close the form the question is asked: "Do you want to Save?" This question should not appear since the data is already saved
>>
>>Are you sure ?
>>Are you certain that the saving routine resets the state of the view ?
>>What does it do? TABLEUPDATE (.T. ) ?
>>
>
>Yes, it does tableupdate.
>
>>(we can answer Yes or No, it would make no difference). Do you know why GetNextModified() function reports a change here while new status code is already saved?
>>
>>What value does he/she return GETFLDSTATE(-1)?
>>Which field does it result modified?
>>
>
>It reports the combo's field as modified. However, even if I answer NO on the question to Save, the change is already saved. In other words, this question should not appear, since the data are indeed saved. I have the same behavior in another simpler form. I interactively change the combobox value, then press the Cancel button that does tablerevert() and then again the question is asked: do you want to save? There is nothing to save.
>
>>If you remove
>>
>>thisform.cntMainInfo.cboStatusCodes.displayvalue = m.lcNewStatusCode
>>
>>doesn't the problem appear?
>
>I may play with different value instead of this. If I remove combo's displayvalue, there would be nothing to save.
Put a debug message on Combo Valid and lostfocus() methods:
messagebox("valid")
messagebox("lostfocus")
I guess that the combobox writes in the field after the TableXXXX () operation done in Save().
A workaround
NODEFAULT