Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Numeric Controlsource
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00593923
Message ID:
00594282
Views:
37
<
this seems to work for when the controlsource is a table, but not a property or memory variable.

It seems to be using the listindex as the value.>>

Hi Freddie,

In my limited experience you want to stay well away from binding a property or a variable as a control source. What I do is this:

Unbind the combo and set boundto to .F.

In the lostfocus event write.

thisform.property = this.ListItem(this.ListItemId, ColumnNumber)

you'll need to put VAL or CTOD around the right hand side of this depending on what data type you want in the property (combo's are strictly strings).

I'm afraid you'll have to set the display value when you create a new record or when you move to another. Either that or stick to directly binding the field.

Yeh...it sucks! I know. I'm afraid I've grown to severely dislike the VFP combo box in the same way that VB's grids suck.

If anyone has a better way of doing this I want to know about it first coz I've just spent two months screeming at my colleagues like John MacEnroe.

Pablo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform