Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dropdown Listbox displayvalue / value problem
Message
 
 
To
31/01/2006 07:28:17
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Miscellaneous
Thread ID:
01091826
Message ID:
01091834
Views:
18
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform