Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dropdown Listbox displayvalue / value problem
Message
 
 
À
31/01/2006 07:28:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Divers
Thread ID:
01091826
Message ID:
01091834
Vues:
17
First, I don't see a remote view in your code but rather SPT cursor. Second, you have to issue .DamageNoCombo.Requery() after rowsource changes.

>I've got a dd List with a remote view as rowsource, rowsourcetype = fields.
>
>A button on the form lets users add an integer value to the rowsource, which then, in an ideal world, would be displayed in the listbox.
>
>Only, this does not happen until the data are commited to the backend and a requery is isssued. Is there anything I can do about this?
>
>
>nDamageId = Damages.DamageId
>nRetval = SQLExec(lnSql,[SELECT DamageId From dbo.DamageNumbers Where DamageId = ?nDamageId],[DamageIds])
>
>If Reccount('DamageIds') = 0 Or Isnull(DamageIds.DamageId) Or DamageIds.DamageId = 0
>	Select DamageNumbers
>	Append Blank
>	This.Parent.DamageNoCombo.ListIndex = Reccount('DamageNumbers')
>Else
>	Select DamageNumbers
>	Locate
>	Locate For DamageId = nDamageId
>Endif
>
>nRetval = SQLExec(lnSql,[SELECT IDENT_CURRENT('dbo.DamageNumbers') + 1 AS
>DamageNo],[DamageNo])
>
>Replace DamageNumbers.DamageNo With DamageNo.DamageNo
>
>With This.Parent
>	.DamageNoCombo.Value = DamageNumbers.DamageId
>	.DamageNoCombo.DisplayValue = DamageNumbers.DamageNo
>	.DamageNoCombo.Refresh
>Endwith
>
>
>TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform