Setting combobox rowsource

  • Thread starter Thread starter Roy Goldhammer
  • Start date Start date
R

Roy Goldhammer

Hello there

I have Continues form with two comboboxes.

The first Combobox rowsource is list of Countries on the world and the
second combobox rowsource is the list of cities on the world.

If the County combobox is selected i need to see only the citys in the
parent country.

It works fine on the current record. But if in one of the other records does
not contain the same country. I can't see the city i've chosed, because the
row source is efected on the entire form.

Is there a way to show the other citys on another records that not selected?

any help would be useful
 
Access does not load the RowSource of the combo for every line, i.e. only
the items in the current record can be displayed.

That limitation only applies if the combo's bound column is zero-width. If
it can display the actual bound value, then there is no problem with the
display on the other rows.

The other (messier) alternative is to make a query as the RecordSource of
the form, and include the table of countries/cities so you can place a text
box for the city on the form as well. Place it in front of the combo, and
make its width about 0.2" less, so the combo's drop-down can still be seen
and the user can't really notice it's a text box as well. Set the text box's
TabStop to No. In its Enter event, SetFocus to the combo. Now the combo
jumps in front on the current record only so the user can enter a value, and
all other rows show the text box in front.
 
Back
Top