Need to use a combo box with multiple fields

G

Guest

I have several Combo boxes on my form.
These are taking data from different tables.
I can get the results to display when i choose a field in the drop down box
and it does also display the results in a text box for the next line accross
in the combo box.
I am trying to use a few more text boxes to display the results from the
combo box but not sure how to do it.
Can somone go through this in simple terms.

Cheers

Steve
 
G

Guest

When you say "it does also display the results in a text box for the next
line accross
in the combo box"

how are you doing this?
 
J

John W. Vinson

I am trying to use a few more text boxes to display the results from the
combo box but not sure how to do it.

Let's say the combo box is named cboMyCombo, and it has five columns in its
RowSource query (and its ColumnCount is 5 to include them all).

You can put a textbox on the form with a Control Source of

=cboMyCombo.Column(n)

where n is an integer 0 to 4 - it's zero based, so 4 would be the last (fifth)
column.

The combo's text area itself will display the first non-zero width column when
the combo isn't dropped down; you can use these textboxes to display the rest.

John W. Vinson [MVP]
 

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