Preselect value in combo box

V

vegathena

I have a combo box that is populated by a look-up table. This look-up
table only has two columns id and name. Only the name column is
displayed by this combo box and the user uses this combo box to select
a name.

Now to my question:
Usually it's one particular name of this list that is selected and
saved over and over again. To make things more convenient for the
user, Is it possible to "preselect" or "prefill" this combo box with
this particular name from the list? if so, how to do that?

Thanks for your input.
 
D

Dirk Goldgar

I have a combo box that is populated by a look-up table. This look-up
table only has two columns id and name. Only the name column is
displayed by this combo box and the user uses this combo box to select
a name.

Now to my question:
Usually it's one particular name of this list that is selected and
saved over and over again. To make things more convenient for the
user, Is it possible to "preselect" or "prefill" this combo box with
this particular name from the list? if so, how to do that?


You could set the combo box's DefaultValue property to the ID value of the
name that you want. If you know that value at design time, you can just put
that value on the Default Value line of the Data tab of the control's
property sheet in design view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top