Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Behaviour of Combo Box
Message
De
18/04/2013 14:18:58
 
 
À
18/04/2013 13:06:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
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:
01571395
Vues:
27
>>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 ?
>
>Get the Browse out of the SCAN loop. It moves the record pointer.
>
>Also, you don't need bother DISTINCT and GROUP BY in the query. Either one will do and DISTINCT makes it more obvious what you're doing.
>
>Finally, get rid of the call to Requery at the end of the loop. Unneeded and might cause trouble.
>
>Tamar

No, Madam,. I did all what you said. But the problem stands unresolved. I am getting the Two items only as said above. No new items.
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform