Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help - Combo values disappear...
Message
From
01/08/2001 05:26:45
 
 
To
31/07/2001 19:09:14
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00538088
Message ID:
00538202
Views:
9
Hi!

Refresh your comboboxes by following way:
.cboQuadra.ROWSOURCE = ""
.cboQuadra.ROWSOURCETYPE = 0
.cboQuadra.ROWSOURCETYPE = 3
.cboQuadra.ROWSOURCE = "SELECT nome_num, codigo FROM quadras ...

In addition, check if field value of control source match EXACTLY to the field value in the combobox list. When case is different, coombobox will be empty. When field length is different, value is also not be selected. Finally, if it is the numeric value, I recommend you to change it to use character value. Combobox works k only with character-type data.


>In a Form I have 3 combos cboLoteamento, cboQuadra, cboLote where cboQuadra depends on a value selected in cboLoteamento and cboLote depends on value selected on cboQuadra.
>cboLoteamento->cboQuadra->cboLote
>
>The "properties" of combo1 are(cboLoteamento):
>cboLoteamento.BOUNDCOLUMN = 2
>cboLoteamento.ROWSOURCETYPE = 3
>cboLoteamento.ROWSOURCE = "SELECT nome, codigo FROM loteamentos ORDER BY nome ;
>INTO CURSOR cur_loteamentos"
>
>The "properties" of combo2 are(cboQuadra):
>cboQuadra.BOUNDCOLUMN = 2
>cboQuadra.ROWSOURCETYPE = 3
>cboQuadra.ROWSOURCE = "SELECT nome_num, codigo FROM quadras WHERE ;
>cod_loteamento = ?cCBO1_Value order by nome_num INTO CURSOR cur_quadras"
>
>The "properties" of combo3 are(cboLote):
>cboLote.BOUNDCOLUMN = 2
>cboLote.ROWSOURCETYPE = 3
>cboLote.ROWSOURCE = "SELECT numero, codigo FROM lotes WHERE ;
>lotes.STATUS stat_venda AND cod_quadra = ?cCBO2_Value ;
>order by numero INTO CURSOR cur_lotes
>
>In the InterActiveChange of Combo1:
>DODEFAULT()
>LOCAL cCBO1_Value, cbo1
>SET STEP ON
>cbo1 = THIS.VALUE
>WITH THISFORM.cboQuadra
> .REQUERY()
> .LISTINDEX = 0
>ENDWITH
>THISFORM.cCBO1_Value = THIS.DISPLAYVALUE(1)
>
>
>In the InterActiveChange of Combo2:
>DODEFAULT()
>LOCAL cCBO2_Value, cbo2
>cbo2 = THIS.VALUE
>WITH THISFORM.cboLote
> .REQUERY()
> .LISTINDEX = 0
>ENDWITH
>THISFORM.cCBO2_Value = THIS.DISPLAYVALUE(1)
>
>When I ADD new record and select the values of the combos and save it the combo shows the values added, but if I move the pointer with First, Next, Last, etc... the 2° and 3° combo doesnt show the values more, all other objects keep showing the right values.
>
>To move the pointer I USE SKIP, SKIP -1, GO TOP, GO BOTTOM and call the method valor_combos that is below:
>
>LOCAL cCBO1_Value, cCBO2_Value
>cCBO1_Value = THISFORM.cod_lote
>cCBO2_Value = THISFORM.cod_quadra
>
>WITH THISFORM
>.cboQuadra.ROWSOURCETYPE = 3
>.cboQuadra.ROWSOURCE = "SELECT nome_num, codigo FROM quadras ;
>cod_loteamento = ?cCBO1_Value ;
>ORDER BY nome_num INTO CURSOR cur_quadras"
>
>.cboLote.ROWSOURCETYPE = 3
>.cboLote.ROWSOURCE = "SELECT numero, codigo FROM lotes ;
>WHERE lotes.STATUS = stat_venda AND cod_quadra = ?cCBO2_Value ;
>ORDER BY numero INTO CURSOR cur_lotes"
>ENDWITH
>THISFORM.REFRESH
>
>If I start the form and move the pointer it works fine, but if I add a NEW record, the values of the the 2° and 3° combo disappear, but all other objects shows the right value.
>
>Could someone help me please ?
>
>TIA
>
>Peter
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform