Information générale
Catégorie:
Codage, syntaxe et commandes
>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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement