make a continuous form of People, frmList.
In the header put a combo box for state and 1 for City.
make 2 queries:
1 to filter Cities for the picked State, qsCity1State ;
1 no filter , all cities, qsCitiesAll
Query ,qsCities1State, would be:
select * from table where [state]=forms!frmList!cboState
the cboState uses qsStates query, user picks a state. In the cboState AFTERUPDATE event, use the code to change the query on the City cbo.
Code:
sub cboState_afterupdate()
cboCity = null 'clear prev entry
if isNull(cboState) then
cboCity.rowsource = "qsCitiesAll"
me.filterOn = false
else
cboCity.rowsource = "qsCity1State" 'filter the combo box with cities from that 1 state
me.filter = "[State]='" & cboState & "'" 'filter the continuous form with 1 state items
me.filterOn = true
endif
end sub
when the user picks from the cboCity combo, then filter items further
Code:
sub cboCity_afterupdate()
me.filter = "[State]='" & cboState & "' and [city]='" & cboCity & "'"
me.filterOn = true
end sub
Now when user picks an item from the list to see the detail of a single person. frmDetail.
this can load if the user picks an item from the list and wants to seem more detail...
docmd.openform "frmDetail",,,"[id]=" & me.ID