Changing combobox lookups

L

Larry Charlton

I have a form with two combo-boxes, say MasterType and SubType.
MasterType has the values A and B. SubType has the values:
A 1
A 2
B X
B Y

I put code in the OnCurrent and in MasterType's OnChange event to Requery
the SubType. This works fine for data entry, but in a datasheet view, when
I'm on MasterType A, All the master type B records go blank. When I navigate
to a type B record, all their sub types show but the Master Type A Sub Type
records go blank.

How to a make depenedant combo-boxes work in a datasheet?
 
D

Douglas J. Steele

The issue is that you're trying to change the RowSource for a combo box, so
it impacts every instance of that combo box on the form.

You should be able to use Sandra's approach of superimposing a text box over
the combo box to display the actual value. After all, you only need the
combo box on the current row, not on any of the other ones.
 

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