"Parent combo" default value does not give me proper rowsource in "child combo"

T

Tom

I use cascading combos which have rowsources driven by events. In some
instances, the rowsource of the "parent combo" may have only a single value.

In such case, I use the following line to automatically select this value as
the default value:

Me.cboDivision = Me.cboDivision.ItemData(0)

It shows up properly; however, when I now click on the "child combo" it does
not show the subordinate records. Only once I click on the parent combo --
and select the already pre-selected single value -- I then get the rowsource
in the child combo.

How can I make it that the single value in parent combo is selected and I
automatically get the proper rowsource in the child combo as well?

Thanks,
Tom
 
K

Ken Snell [MVP]

I'm guessing that you have code that runs on the AfterUpdate event of the
"parent" combo box in order to requery the second combo box. Just call the
AfterUpdate event's code when you set the value of the "parent" combo box.

Me.cboDivision = Me.cboDivision.ItemData(0)
Call cboDivision_AfterUpdate()
 

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