Text box displaying columns from a combo box

D

Don

I'm using text boxes to display the column data from a combo box. Trouble is
when I move to another record or close the form and ome back in, those
results are not displayed anymore and I have to reslect the values in the
combo boxes to fill in the text boxes. Is there a way to lock the results to
the text box for each record?

TIA
 
A

Allen Browne

Don, I take it that you have a combo bound to a field in your table. When
the combo is dropped down, you see several columns, but when it's not
dropped down you can see only one. Therefore you have added some other text
boxes to your form to show those other columns, even when the combo is not
dropped down.

If this form is in Form view, (not Datasheet or Continuous), you could just
set the Control Source of the text boxes to read the data from the combo's
columns. For example, to show the value of the 3rd column of Combo3:
=[Combo3].[Column](2)
(Note that the first column is zero, the next is 1, and so on.)

If the form shows multiple rows, you need a different solution. Create a
query to use as the source for this form. In the query, include your main
table, and the table the query gets its fields from (assuming that's a
many-to-one relation.) You can then add the fields you want from the combo's
table to the query, and then display them in the text boxes on your form.
 

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