Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox and data environment
Message
From
04/01/2001 10:14:07
 
 
To
04/01/2001 08:43:50
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00459289
Message ID:
00459336
Views:
21
>Hello,
>
>In a form's DE I have a table and a child table like Company and Street, while the Company.StrId is linked to Street.StrId. On a combobox the streetname should be displayed, and can be changed using the combobox as well.
>
>Normally I do the update of the Company.StrId in the save method (like Replace Company.StrId WITH Street.StrId), and I do not bind the combobox to a data field, because it never seems to work (the Combobox shows the Street.Description). But I think there must be an easier way, and maybe somebody can explain me how to do this.

The combobox can be bound to a field other than the one displayed, e.g.,
With thisform.cboStreet
  .ControlSource = "company.strid"
  .RowSourceType = 6 && fields
  ** note: first column in RowSource is always the displayed column when
  ** the drop-down is not dropped
  .RowSource = "street.description,strid"
  .BoundColumn = 2   && strid
  .BoundTo = .T.     && if strid is numeric, if not, doesn't matter
  .ColumnCount = 1   && shows only the first field when the combo is dropped
EndWith
>
>Thanks for you help (and best wishes for the new year to all!)
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform