Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initial Value of ComboBox
Message
From
01/10/1996 14:53:25
 
 
To
26/09/1996 00:47:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00008569
Message ID:
00009032
Views:
30
>I have two tables in a 1:M relationship.
>I have a form that is used only for adding new records to the child table. I have a combobox that I want to use as a lookup table (the parent) to limit the user to choosing only from the values in the parent table. So, I populate the combobox with RowSourceType = 3, and use a select in the init() for the combo.
>
>The behavior that I want, and can't seem to get, is for the combobox to have the first item selected and showing in the combobox rather than an empty combobox. If I don't append blank the combo shows the top item of the parent table. But, I *think* I'm only appending a blank to the child table. Why does the combobox get a blank to start off with?
>
>If I can't get that behavior, I'd like to at least have my valid code which checks for EMPTY() fire when they tab out of the combobox without selecting a value. But, I guess with combos, just tabbing through doesn't cause the valid to fire?
>
>Any ideas? I'm sure this is probably pretty basic, but I've searched through numerous manuals, books, and on-line stuff and haven't found the answer.
>
>TIA,
>Lynn Walton


To make the combo box start with the first item (or any item)
in the init of the combo box type:
this.listindex = 1 (or 2 for the second item, etc ...)
LAr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform