Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing ComboBoxes
Message
 
To
10/05/2000 14:32:01
Steven Kleypas
Tarrant County College District
Texas, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00368121
Message ID:
00368487
Views:
24
>
>By bound to, do you mean a controlsource? There really isn't a controlsource. The selections for each control come from separate views originating from the same table. Each combo just presents a list of selections to the user to set up the view parameters for the primary biz object for the cListObjEdit control. I've tried setting the controlsource for the comboboxes to the field in their respective views (i.e. RowSource), but it didn't make any difference.
>


Try this: Create a property on the form for the combo. Preset the property to the item you want selected in the combo. Here's some sample code I used from an app where I need to refresh/preset a combo a lot:

* Assumes v_routelist has already been requeried
* This presets the combo to the first item in the view

THISFORM.cboRouteGroup.ComboBox.Requery()
THISFORM.cRoute = v_routelist.route
THISFORM.cboRouteGroup.ComboBox.Value = THISFORM.cRoute
THISFORM.cboRouteGroup.ComboBox.Refresh()

The combo's controlsource is THISFORM.cRoute. This code is called from my form's INIT() method (plus a few other places when things are changed).


HTH
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform