Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo won't show DisplayValue
Message
De
16/01/2008 16:21:51
 
 
À
16/01/2008 13:09:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01282338
Message ID:
01282410
Vues:
20
I wonder if a DODEAULT in Requery would make a difference?

good luck

>I've got a combo that's behaving weirdly and I can't figure out what I'm missing. This is in a form I inherited from someone else, to which I've made some changes over time.
>
>The combo is a dropdown list, which is populated from a cursor. The cursor is created in the combo's Requery method. There's some code in the Valid (which I moved there from InteractiveChange).
>
>The problem is that after making a selection, the combo box is blank, DisplayValue is empty, and the record pointer for the cursor has moved to the last record. Oddly, though, Value still contains the right value.
>
>I've used Event Tracking and Coverage to see what's running, and the change is happening after the end of the Valid and before the beginning of the When, but no code is running there.
>
>Here's the definition of the combo:
>
>
>	ADD OBJECT cbonumberdisplay AS ravicbo WITH ;
>		FontName = "Tahoma", ;
>		FontSize = 8, ;
>		BoundColumn = 2, ;
>		RowSourceType = 2, ;
>		RowSource = "ValidClinicNumbers", ;
>		ControlSource = "ThisForm.iClinicID", ;
>		Height = 24, ;
>		Left = 505, ;
>		Style = 2, ;
>		TabIndex = 1, ;
>		Top = 0, ;
>		Width = 100, ;
>		BoundTo = .T., ;
>		Name = "cboNumberDisplay"
>
>
>Here's all the code for the combo (with my various DEBUGOUTs removed):
>
>
>	PROCEDURE cbonumberdisplay.Valid
>			mDisplayAppClinicNumber = ValidClinicNumbers.Clnc_Num
>			IF EMPTY(mDisplayAppClinicNumber)
>				mDisplayAppClinicNumber = transform(0, "@L 999")
>			ENDIF
>			thisform.DisplayAppClinicNumber.Refresh()
>
>	ENDPROC
>
>
>	PROCEDURE cbonumberdisplay.Init
>		This.Requery()
>	ENDPROC
>
>
>	PROCEDURE cbonumberdisplay.Requery
>		* Modified 1-December-2005 by TEG
>		* Changed RowSourceType and move this code here.
>
>		* Get data
>		SELECT Clnc_Num, iClinicID as ClinicNum FROM Clinic INTO CURSOR ValidClinicNumbers nofilter
>	ENDPROC
>
>
>The only other line in the whole form that addresses this control is in the form's Init:
>
>
>This.cboNumberDisplay.Value = goApp.iClinic
>
>
>Anybody have any suggestions?
>
>Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform