Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering records by list box.
Message
From
12/05/2003 05:02:48
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00787216
Message ID:
00787218
Views:
28
Hi Neil:

It might be an idea to have the control source of your list box specifying a form property (I assume that you have not specified a control source, right?) ie., THISFORM.cListBox1, THISFORM.cListBox2 etc., (one for each of the list boxes in question). Then, when you click your search button, just do a SEEK or SQL select based on the value of the form properties which should reflect the value of the current listboxselection. Is this the kind of thing you mean?

>I have a form with a list box which has several values i.e. T1, T2, T3 ..........T7. This list box is not connected to any table. The values are added manually. I have a table from a database application which has thousands of records. One of those fields is called department and contained within the field are the values T1 or T2 or T7 etc.
>
>What I would like to do is to use the list box on my form (multiple select) and then click a button to find those records that match what I have selected in the list box. For example if I select T2 and T7 then it would list those records that have T2 and T7 in the department field. I suppose I need some looping statement to do this. Can anybody start me down the right path.
>
>Thankyou very much!
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform