Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help - Combo values disappear...
Message
De
02/08/2001 08:45:19
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/08/2001 10:15:46
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00538088
Message ID:
00538761
Vues:
14
>Following your advice, I change valor_combos method this way:
>
>SELECT("v_clientes_")
>cbo1= v_clientes_.loteamento && value of combo Loteamento stored in table
>cbo2= v_clientes_.quadra && value of combo Quadra stored in table
>WITH THISFORM
> .cboQuadra.ROWSOURCETYPE = 3
> .cboQuadra.REQUERY()
> .cboLote.ROWSOURCETYPE = 3
> .cboLote.REQUERY()
>ENDWITH
>
>codigo is my bound column, and is character type, ("2", "3", "45"....),
>
>The field value of control source also match exactly the field value of the combobox:
>cboLoteamento.ControSource = v_clientes_.loteamento
>cboQuadra.ControSource = v_clientes_.quadra
>cboLote.ControlSource = v_clientes_.lote
>
>Sometimes there's a strange behavior, moving the pointer, sometimes the values
>of the combos dissapear(2° e 3°combo), always the same in the records.
>
>What could it be ?
>
>TIA
>
>Peter

Peter,
They have controlsources :) In valor_combos let combos catch corresponding value before a requery on next. I think you should be comfortable with something like this :
*Form init
public stat_venda && ???
*The "properties" of combo1 are(cboLoteamento):
With thisform.cboLoteamento
  .ROWSOURCETYPE = 3
  .ROWSOURCE = "SELECT nome, codigo FROM loteamentos "+;
    "ORDER BY nome INTO CURSOR cur_loteamentos"
  .BOUNDCOLUMN = 2
Endwith

*The "properties" of combo2 are(cboQuadra):
With thisform.cboQuadra
  .ROWSOURCETYPE = 3
  .ROWSOURCE = "SELECT nome_num, codigo FROM quadras "+;
    "WHERE cod_loteamento = cur_loteamentos.nome "+;
    "order by nome_num INTO CURSOR cur_quadras"
  .BOUNDCOLUMN = 2
Endwith

*The "properties" of combo3 are(cboLote):
With thisform.cboLote
  .ROWSOURCETYPE = 3
  .ROWSOURCE = "SELECT numero, codigo FROM lotes "+;
    "WHERE lotes.STATUS = stat_venda "+;
    "AND cod_quadra = cur_quadras.nome_num "+;
    "order by numero INTO CURSOR cur_lotes"
  .BOUNDCOLUMN = 2
Endwith
this.Valor_Combos()

*cboLotemento.Interactivechange
DoDefault()
With THISFORM.cboQuadra
  .REQUERY()
  .LISTINDEX = 0
Endwith
With THISFORM.cboLote
  .REQUERY()
  .LISTINDEX = 0
Endwith
*cboQuadra.Interactivechange
dodefault()
With THISFORM.cboLote
  .REQUERY()
  .LISTINDEX = 0
Endwith

*form.Valor_combos
With THISFORM
  with .cboLoteamento
    .Requery
    .Controlsource = .Controlsource && Let it catch its value
  endwith 
  with .cboQuadra
    .requery
    .Controlsource = .Controlsource
  endwith	
  .cboLote.requery
  .REFRESH
Endwith
PS:Stat_venda sounds to be a memvar which might cause further headaches. You should be controlling it well. You might fail to select code_lote for a corresponding v_clientes.code_lote.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform