Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox workaround
Message
 
To
05/11/1997 12:27:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00058366
Message ID:
00059192
Views:
25
>>>Has anyone found a workaround for a combobox not being able to display a value that does not exist in it's rowsource? I would like to have it display the value in the controlsource, but I don't want to fill the rowsource until the combobox actually gets the focus. I have a form that has a lot of comboboxes and it would require a lot of individual cursors to be populated before the form comes up. I would rather use one parameterized view for the rowsource of these comboboxes and have the pick lists available only when the combobox gets focus.
>>
>>It's MS that found the workaround and gave us Combo.DisplayValue property to display value which is not in RowSource.
>
>My combobox is bound to a 'view1.code' field - I want to display the 'view2.desc' field before the rowsource gets filled. If DisplayValue will do this, where do I set combo.DisplayValue? The rowsource is set to view2.code, desc, rowsourcetype = fields. I have tried everything I can think of and still cannot get the combo to display the value.

Steve,

You might put a condition in the REQUERY(). That's something I started to do to help my forms popup faster. Bear in mind they have a call to requery() in their init.

My code for a Combo REQUERY() might look like this:
LPARAMETERS lVParm

IF TYPE("thisform.oBizObj.Name") = "C"
LOCAL lnOldSel
lnOldSel = SELECT()
vp_cTarifIdClrEx = lvParm
SELECT v_CvpClrEx
Requery()
SELECT (lnOldSel)
ENDIF

José
Previous
Reply
Map
View

Click here to load this message in the networking platform