What to do with countries and cities…
I’m designing some tables which hold country and city in them. I’d like to create some tables:
Table tblCountries
CountryID
CountryName
Table tblCities
CityID
CityName
CountryID (FK to tblCountries.CountryID)
And then finally the table tblLocations with
LocationID
CityID (FK to tblCities.CityID so the country is also included in this)
Doing so, I’m always having problems with displaying these items in the forms as combobox or list (the item created out of tblLocations.CityID shows city and country when you drop down the list, but the field only shows the city etc etc…
Isn’t this the right way to do it? Or is there a better way to create relationships between countries and cities if you want them in a separate table ?
(I checked out all the sample databases from MS Access but they never have cities and countries in separate tables…. I know why !)
Thanks for any suggestions !
Kimx
I’m designing some tables which hold country and city in them. I’d like to create some tables:
Table tblCountries
CountryID
CountryName
Table tblCities
CityID
CityName
CountryID (FK to tblCountries.CountryID)
And then finally the table tblLocations with
LocationID
CityID (FK to tblCities.CityID so the country is also included in this)
Doing so, I’m always having problems with displaying these items in the forms as combobox or list (the item created out of tblLocations.CityID shows city and country when you drop down the list, but the field only shows the city etc etc…
Isn’t this the right way to do it? Or is there a better way to create relationships between countries and cities if you want them in a separate table ?
(I checked out all the sample databases from MS Access but they never have cities and countries in separate tables…. I know why !)
Thanks for any suggestions !
Kimx