Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple selections from a listbox
Message
From
04/01/1999 16:36:41
 
 
To
04/01/1999 16:06:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172555
Message ID:
00172570
Views:
29
>The seemingly simple things allude me. How do you reference multiple selections from a listbox for use as variables in building an expression that will filter a free table? The listbox has only one column, taken from a field in the same free table.

David gave you right idea. It's just an extension:
CREATE CURSOR tmp (myfield C(10))
For n=1 to Thisform.MyListbox.Listcount
 If Thisform.MyListbox.Selected(n)=.T.
  Insert Into tmp Values(Thisform.MyListbox.List(n))
 Endif
Endfor
Select ... From Mytable Where Myfield IN (Select MyField From tmp)
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform