Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering records by list box.
Message
De
12/05/2003 06:37:45
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00787216
Message ID:
00787251
Vues:
19
Hi Neil,

the good solution ( for max 7 item) is:

On activator procedure ( List.LostFocus,Button.Click...)

*tField is not indexed

sList=''
WITH ListBox
FOR i=1 to .ListCount
IF .Selected(m.i)
sList=m.sList+",'"+.List(m.i)+"'")
ENDIF
ENDWITH

SELECT blabla FROM table WHERE inlist(tField &sList.)

if is indexed

CREATE CURSOR tList (fSel C(2))
WITH ListBox
FOR i=1 to .ListCount
IF .Selected(m.i)
INSERT INTO tList VALUES (.List(m.i))
ENDIF
ENDWITH

SELECT blabla FROM table JOIN tList ON tField=fSel

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform