Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update List box from Combo box
Message
From
20/04/1998 19:21:36
Edward Crawford
City Facilities Management
Glasgow, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00093522
Message ID:
00093527
Views:
27
>How do I update a list box to reflect items related to a selection made from a combo box. I have a combo box listing certain device categories, whenever the selection is made in the combo box I would like to update a list box on the same form with only the respective devices in this category, and only show certain fields. I'm pretty sure this isn't hard but, I haven't figured it out yet. Thanks for any help.

You could create a property for each variable that is required to construct your listbox SQL statement. Make these properties the control source for your combobox selections. Refer to these properties in your SQL statement preceeded with a question mark ei: SELECT *
FROM table1
WHERE table1.field1 = ?oForm.Param1
AND table1.field2 = ?oForm.Param2
INTO CURSOR list

Now run the listbox's .Requery() method and you should be updated.
Previous
Reply
Map
View

Click here to load this message in the networking platform