Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox again
Message
From
07/11/2005 06:26:44
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01064970
Message ID:
01065929
Views:
25
This message has been marked as the solution to the initial question of the thread.
>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 (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?
>
>Thanks in advance.
_________________________________________________________________________________________________________
N,

Try to take the focus off the combo after the assignment (or simply reset focus() after the assignment)


>
>*** Update status code
>
>            thisform.cntMainInfo.cboStatusCodes.displayvalue = m.lcNewStatusCode

             =thisform.cntMainInfo.cboStatusCodes.SetFocus()

>            thisform.lStatusCodeChanged = .T.
> 			thisform.oBizObj.lCascadeMessages = .F.
>
>            if m.llRetVal and thisform.oBizObj.save() = FILE_OK
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform