Link to home
Start Free TrialLog in
Avatar of Eduardo Fuerte
Eduardo FuerteFlag for Brazil

asked on

VFP - combobox retrieving values ?

Hi Experts

I'm facing a problem in retrieving the column sb_cccx that has the code associated with the description (like bellow)  from a combo when clicking in an combo option during edition:

Select SB_CCCX, Desc From CCCX;
      ORDER By Desc;
      WHERE SB_EMP = m.SB_EMP And;
      ATIVA=1;
      INTO Cursor temp_cccx

tam = _Tally
i=1
If tam>0
      Go Top
      Scan
            Thisform.pageframe1.page1.cmbCCCx1.List(i) = temp_cccx.Desc
            i = i+1
      Endscan
Endif
*---
How to code to  make  thisform.msb_cccx property to have the correct value when the user clicks the option ?




img-291210.bmp
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eduardo Fuerte

ASKER

Hi, Pcelba

Using the initial suggestion the only problem is to obtain existing values in the combo when open the form and navegating betwenn registers (it comes empty)

What is needed to workaround it ?

Thanks.
The combo should be populated in Form Init method or elsewhere. Where is your code to create Combo contents?

What are all non-default properties for the combo?

Did you try to look at combop properties in debugger?
Hello

Sorry the delay....

I've checked some properties and made some code adjusts and evereythings is ok...