I think you have States and Cities swapped.
If so, then you don't need two tables...
One state can have many cities...... True
One City can be in many states.... False
Therefore, you have a one to many relationship between states and cities.
I would have two tables:
table
States
Fields
-----
StateID_PK Autonumber
StateName Text
table
Cites
Fields
-----
CityID_PK Autonumber
StateID_FK Long
CityName Text
Population Long (or Text)
Likes Text (???)
Handover (???)
The relationship is States.StateID_PK --> Cities.StateID_FK
The combo boxes would be:
ComboStates
------------
Row Source:
SELECT States.StateID_PK, States.StateName
FROM States
ORDER BY States.StateName;
Column count: 2
Bound Column: 1
Column Widths: 0"
ComboCities
------------
Row Source:
SELECT Cities.CityID_PK, Cities.CityName, Cities.Population, Cities.Likes, Cities.Handover
FROM Cities
WHERE (((Cities.StateID_FK)=[forms]![Form8].[comboStates]))
ORDER BY Cities.CityName;
Column Count: 5
Bound Column: 1
Column Widths: 0"
The code for comboStates:
Code:
Private Sub ComboStates_AfterUpdate()
ComboCities.Requery
End Sub
Code for comboCities:
Code:
Private Sub ComboCities_Click()
Me.Population = Me.comboCities.Column(2)
Me.Likes = Me.comboCities.Column(3)
Me.Handover = Me.comboCities.Column(4)
End Sub
After selecting a State, then a City, the text boxes are filled in. This is assuming that they are unbound text boxes.
If you are wanting to edit the City name, Population, Likes, or Handover fields, I would suggest using a mainform/subform arragement.