Subject Re: [IBO] Lookup Combo
Author Geoff Worboys
Andy,

It is possible to setup master-detail amongst lookup datasets. So...

The lookup table for Country becomes the master for
the lookup table for State which becomes the master
the lookup table for City.

So when you lookup the country, the state lookup becomes restricted by
its relationship to the country table and so on.

I originally had something similar. I then decided that my particular
database was going to have very few entries for other countries - so I
give the user a lookup only for the city - and show the state/country
to which the city belongs in the lookup. This kept the interface
simpler for the user.

HTH

Geoff Worboys
Telesis Computing

> I hope somebody has a solution for this type of scenario.
>
> I have 4 tables, Contact ( in SM database ), Country, State
> and City ( these 3 tables in MASTER database ).
> Contact table, the primary key is Id, the table has 3 other fields,
> CountryId, StateId, CityId.
> Country table, the primary key is Id, which is a country id.
> State, the primary key is CountryId + Id
> City, the primary key is CountryId+StateId+Id
>
> I've set 3 Lookup combo and they are all seems to work fine.
> If I choose another Country, the other 2 would go blank.
>
> The problem arise when I tried to update a contact, for example
> who lives in ( County - State - City ids ) USA - TX - TX.
> I want to update to Singapore which has Country, State, City Ids
> of SIN - SIN - SIN.
> When I chose Country=SIN, the 2 others combo gone blank and I
> can actually commit the transaction. Now the values would be
> SIN - TX - TX, which is wrong.
>
> 1. Is there a simple and quick way to solve this ( such as
> adjusting some properties of IBO components ) ?
> I can not use foreign key since the 3 tables not in the same
> database.
>
> 2. It also seems that the State and City combo can not filter
> the list. For example, when I chose SIN in the Country, the
> drop down State still display USA states, etc. It supposed
> to only list the SIN's state.
>
> TIA
> Andy