Combo box columns


P

Pastor Del

I have 2 combo boxes on an unbound form. I want to fill the list of the
second combo box based on the second column of the first combo box selection.
I have successfully used [Forms]!MyForm]![MyCombo] in the row source of
combos before and Forms !MyForm!MyCombo].Column(1) in code before, but the
..Column(1) does not work for me in a combo row source.

How can I refer to a specific column of a combo's row source from the
criteria of a column in a different combo's row source?
 
Ad

Advertisements

M

Marshall Barton

Pastor said:
I have 2 combo boxes on an unbound form. I want to fill the list of the
second combo box based on the second column of the first combo box selection.
I have successfully used [Forms]!MyForm]![MyCombo] in the row source of
combos before and Forms !MyForm!MyCombo].Column(1) in code before, but the
.Column(1) does not work for me in a combo row source.

How can I refer to a specific column of a combo's row source from the
criteria of a column in a different combo's row source?


Use the first combo box's AfterUpdate event to copy the
second column to a (hidden?) text box:

Me.txtCol2 = Me.MyCombo.Column(1)

Then the query can refer to it using Forms!MyForm!txtCol2
 

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