immediate update dependant comboboxes

  • Thread starter Thread starter jan
  • Start date Start date
J

jan

Hi

again stuck on an issue

a table id/code/place
the form with tabbedform- on one tab a subform with 2 combo = zipcode /
town
how do I update the town according to the code when selecting the code an
the other way around?
Classical question i think but a problem to me.


Thanks,
Jan
 
You have to be more specific
Do you save in your table the zip code and the town, if so it the wrong way
to go, you should save in your table only the code, that incase you change
the name of the town you wont have to go and update your table.
Now if you insist:
You have two combo, in ComboTown you have the recordsource as follow
select Town, Code From ....
On ComboCode you have the recordsource
select Code, Town From.....

On the ufter update of ComboCode you write
me.comboTown=me.comboCode.column(1)

On the ufter update of ComboTown you write
me.comboCode=me.comboTown.column(1)

If you decide to save only one record - Code but still let the user see two
combo then you write in both of them the same recordsource
select Code.Town from ....
both combo bounded to Code, but on the town combo dont show the code.

in that case you dont need to do anyting on the ufter update of each field,
it will change it auto, on selection
 
Back
Top