Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dropdown List not displaying value
Message
De
22/03/2011 13:01:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Dropdown List not displaying value
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01504536
Message ID:
01504536
Vues:
95
UPDATE: I solved this by calling the combo's Requery() after updating the Rowsource

I've been struggling too long with what should be a simple thing, hope someone can see what I am missing.

I've got a form with typical VCR navigation buttons on it. On one of the pages I display a dropdown list that has all the Receipts for the currently selected Invoice. Each time the user navigates to a new invoice the list of receipts is built up (if no receipts exist, then a blank record gets added to the c_paymentslist cursor and then the dropdown's refresh is called. In the refresh is this code:
LOCAL lnRecCount, loAlias, loRecno

m.loAlias = CREATEOBJECT("cusPushPopAlias")
SELECT (thisform.iobomgr.oBO_Payment.oDS_Payments.icAlias)
m.loRecNo = CREATEOBJECT("cusPushPopRecno")

m.lnRecCount = RECCOUNT(thisform.iobomgr.oBO_Payment.oDS_Payments.icAlias)
RELEASE m.loRecNo

IF m.lnRecCount > 0
	this.Enabled = .T.
	this.Value = c_payment.iPaymentId	&&creceiptno
ELSE
	this.Value = ""
	this.Enabled = .F.
ENDIF

RELEASE loAlias
The dropdown list is configured with these values:
Rowsource = "c_paymentslist.creceiptno,ipaymentid"
RowSourceType = 6 && Fields
The problem arises if I display one Invoice which has no receipt, then move to an invoice that has a receipt. One the invoice with no receipt, the dropdown's value is set to blank and then disabled. This is fine. When I move to the next Invoice which has a receipt, the dropdown is enabled and its value is set correctly, but the value displayed in the dropdown list is blank. It should be displaying the Receipt Number.

Can anybody see what I am doing wrong?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Répondre
Fil
Voir

Click here to load this message in the networking platform