Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox binding to recno() not key.
Message
 
 
To
27/01/2003 18:53:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00746040
Message ID:
00746043
Views:
20
Chris,

In order to bind a combobox to a numeric field, you've to set BoundTo = .T. However, it could cause another problem if columns Sparse=.F. See Re: Combobox display problems when having focus Message #744570.

>I have a form with a grid and a combobox. The grid is bound to LocalView that has PrimaryKey and DisplayCode fields, and has one column showing the DisplayCode. The combobox ControlSource is LocalView.PrimaryKey, RowSourceType 2-Alias, RowSource is LookupView.DisplayCode,PrimaryKey. BoundTo .F., BoundColumn 2. Scrolling through the grid updates the Combobox display, selecting a new value from the combobox updates the grid. I've done this on several other forms and it worked fine.
>
>But this time, the combobox is displaying values for the LookupView's RecNo(), instead of LookupView PrimaryKey. EG:PrimaryKey 44 is DisplayCode CD100; the Combobox displays RecNo 44 (PrimaryKey 65, DisplayCod MT100)
>
>I can't figure out what's wrong with it. I've compared it to other working forms, but nothing seems amiss. Can anyone else see what I'm overlooking here?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform