Combo Question

  • Thread starter Thread starter David W
  • Start date Start date
D

David W

Is there a way to populate a textbox by what a user picks from a combo box?

I have a combobox that uses a query that is filtered from another combobox.

What I am wanting to do is if a user selects something that is from the list
of the combobox, populate a few textboxes based off of what the user selects
or if it is not in the list, leave the textboxes alone.

The query has all of the fields that is need, I dont know how to get that
information from the combo.
Its sorta like using (get a laugh here, made this one up) ---------?
IsInList Event ? ----------instead of the NotInList Event.
 
Is there a way to populate a textbox by what a user picks from a combo box?

I have a combobox that uses a query that is filtered from another combobox.

What I am wanting to do is if a user selects something that is from the list
of the combobox, populate a few textboxes based off of what the user selects
or if it is not in the list, leave the textboxes alone.

The query has all of the fields that is need, I dont know how to get that
information from the combo.
Its sorta like using (get a laugh here, made this one up) ---------?
IsInList Event ? ----------instead of the NotInList Event.

You can *display* the values of any column in the combo box's
RowSource query by setting the Control Source of a textbox to

=comboboxname.Column(n)

where (n) is the *zero based* subscript of the column in the combo
box. You can set the ColumnWidths property of columns to 0 to conceal
them from view when the combo is dropped down; they'll still show up
in the textbox.

If you're trying to use the combo to store data into a table, copying
it from the combo's table... *don't*. Storing data redundantly is
almost NEVER either necessary or a good idea. If you do want to do so
anyway, please explain.

John W. Vinson[MVP]
 
once you determine the combo value then use that in the rowsource query for
the other combo boxes to limited what shows in them.

"select * from tbl1 where field1 = '" & cmbBox.column(1) & "'"

seeker54
 
Back
Top