Multiple bound fields in a drop down list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a drop down box on a form that has three columns. I need to have the
field bound to the first 2 columns because none of these fields are unique.
Please let me know if there is a way to do this. When a company is picked
from the drop down list, I need to be able to get all three columns into
another table.

Thanks!
Emmy
 
Emmy,

Is your table design set in concrete, or could you consider a revision?
The best approach is to have a unique field in the Companies table
that serves as the Row Source for the combobox, and a single foreign key
field in the "another table" to identify the comapny.

Otherwise, the "headache" approach will involve using VBA procedures to
manage this. If it has to be like this, please supply details of the
Row Source of the combobox, and the field names involved.
 
A control can only be bound to one field in the form's recordsource, so
binding a column in a combo box can't be done. What you can do is create
text boxes for the fields you want populated from the combo columns and use
the After Update event of the combo to populate the text boxes bound to those
fields. If you don't want the user to see those text boxes, you can make
their visible properties False (No).

Me.txtFirstField = Me.MyCombo.Column(0)
Me.txtSecondField = Me.MyCombo(1)
 

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

Back
Top