Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Behaviour of Combo Box
Message
De
18/04/2013 12:00:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Strange Behaviour of Combo Box
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01571365
Message ID:
01571365
Vues:
55
I am trying to populate a combo box using the following code in COMBO INT() Method.
SELECT Distinct Exchange FROM SEARCHREPORT WHERE !ISNULL(Exchange) GROUP BY EXCHANGE INTO CURSOR EXCHANGEWISEOUTSTANDING
This.RowSourceType= 0
WITH This
.AddItem('All Exchanges')

GO Top
SCAN
Browse
.AddItem(Searchreport.exchange)
ENDSCAN
ENDWITH
This.Requery()
Thisform.Combo1.Refresh
Thisform.combo1.ListItemId=1
I could see from the browse window that each record in cursor EXCHANGEWISEOUTSTANDING is scanned properly (Around 15 items).

However at the end I get Combo with only two items "All Exchanges" and "SRBZ1001".
"SRBZ1001" is neither at top nor bottom. Whats Going wrong ? What should I do ?

I have used following other code in my Form. and combo
*Combo Valid
IF ALLTRIM(Thisform.combo1.Value)='All Exchanges'
SELECT searchreport
SET FILTER TO
ELSE
SELECT searchreport
SET FILTER TO Exchange=ALLTRIM(UPPER(thisform.combo1.Value))
ENDIF

SUM PREVBAL TO Total_PREVBAL
SUM LASTPAYAMT TO Total_LASTPAYAMT
SUM ADJAMT TO Total_ADJAMT
SUM CURCHARGE TO Total_CURCHARGE
SUM ACNTBAL TO Total_ACNTBAL
SUM AMTPAYABLE TO Total_AMTPAYABLE
COUNT FOR DELETED()#.T.
GO TOP
Thisform.grdsorting1.Setfocus
Thisform.Refresh 
*****************
* Form INT()
Select Searchreport
SUM PrevBal TO Total_PrevBal
SUM lastpayamt TO Total_lastpayamt
SUM adjamt TO Total_adjamt
SUM curcharge TO Total_curcharge
SUM acntbal TO Total_acntbal
SUM amtpayable TO Total_amtpayable
SUM OSAMT TO Total_os
Locate
Thisform.grdsorting1.Refresh
Thisform.Refresh
******
*Form Setfilter()
LPARAMETERS exchange
SET FILTER to
SET FILTER TO Exchange=ALLTRIM(UPPER(thisform.combo1.Value))
GO top
Thisform.grdsorting1.Refresh
thisform.Refresh 
.
Harsh
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform