Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List Index in a List Box
Message
De
01/10/2004 14:18:55
 
 
À
01/10/2004 14:06:17
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00948036
Message ID:
00948039
Vues:
30
>I am working with a filtered data file and I want to have a list open at a specific record but I can't figure out how to set the list index value to do this.
>
>Suppose I want to start at recno() = r1. What is the value of the list index for the list at that point? My init reads as below and this doesn't work:
>
>SELECT TRANS1
>SET ORDER TO FULLNAME
>SET FILTER TO EXTRA1 > " a"
>LOCATE FOR RECNO()= R1
>NINDEX = THISFORM.LIST1.LISTINDEX
>THISFORM.LIST1.LISTINDEX = NINDEX
>THISFORM.LIST1.SETFOCUS()
>
>Mike Smith

try this
SELECT TRANS1
SET ORDER TO FULLNAME
SET FILTER TO EXTRA1 > " a"
THISFORM.LIST1.requery
COUNT ALL WHILE RECNO()# R1
THISFORM.LIST1.LISTINDEX = IIF(RECNO()=R1,_TALLY+1,_TALLY)
THISFORM.LIST1.SETFOCUS
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform