State, County & City Pick form

  • Thread starter Thread starter Tom Hanley
  • Start date Start date
T

Tom Hanley

I want to allow a user to pick state then pick county then pick city/town
using 3 fields in a form. I was thinking about using a single table with
everything in the one table and each field displaying only valid choices
based on what is picked initially. What is the preferred way to build this?
I haven't had a lot of success using lookup fields in the past....
 
do you intend to use filtered combo boxes on the form? as, user picks the
state from ComboState, which then filters ComboCounty. user next picks
county, which then filters ComboCity. user picks city last.
first of all, i wouldn't put lookup fields in a table at all. your user is
working from a form, so there's no reason to put a lookup field in a table,
and it causes a lot of nasty problems. for details on same, see
http://www.mvps.org/access/lookupfields.htm
suggest you have 3 "lookup" tables, tblStates, tblCounties (with a foreign
key from tblStates) and tblCities (with a foreign key from tblCounties). use
these as the rowsource in each of the combo boxes, respectively. now you can
filter the combo boxes as noted above.

hth
 
You have described something that is very much like what I
need to do. Can you please explain how making a selection
in the first combo box would apply the filter to the
second one? I understand the PK/FK relationship, but not
how to get results based on that.
 
set the criteria in the foreign key field of the second combo box as
Forms!FormName!FirstComboBoxName

in the first combo box's AfterUpdate event, set a procedure or a macro to
requery the second combo box.

hth
 
I understand your explanation to mean that the criteria in
the query on which the second combo box is based needs to
be set to the value in the first combo box. I understand
the principle behind requery (I think), but I have not yet
tried it. Still, it seems pretty straightforward. Thanks
for your help.
 
Back
Top