Linking Fields within a Table!

  • Thread starter yellow_polkadot_tractor
  • Start date
Y

yellow_polkadot_tractor

If i have one field which contains a combo box from which to select an
option is it possible to then have another field, which is linked to
the first field, containing another list of options dependant on what
is selected in the first field?

For example,

Field 1 contains a list of Animal Species in a Combo Box
If i clicked Dog, i would want a list of all dog breeds to appear in
Field 2 from which i could select.
In another scenario i would select Cat in Field 1 and a list of cat
breeds would appear in Field 2

Please tell me if this is possible and if so how i can do this in
Access

Goldiesgirl
 
R

Rick Brandt

If i have one field which contains a combo box from which to select an
option is it possible to then have another field, which is linked to
the first field, containing another list of options dependant on what
is selected in the first field?

Not in a table. In a form (where you should do all this anyway) sure.

You just set the RowSource query of the second ComboBox so that it references
the name of the first ComboBox for its Criteria.

Forms!FormName!ComboBoxName
 
K

Ken Sheridan

As Rick said you'd do it in a form. However, you should not have a field for
Animal Species in the table, only the Field 2 (Breed). By having both fields
the former is redundant as the Animal Species is inferred by the Breed. With
both fields the table is not properly normalized as the Animal Species is
not, to use the jargon, functionally dependent solely on the key but on the
non-key field Breed; its said to be transitively functionally dependent.
This leaves the door open to update anomalies as it would be perfectly
possible to have a value in the Breed field which was not a breed of the
value in the animal Species field.

Nevertheless you can still enter data by selecting the Animal Species first
and then selecting from a list of all breeds of that species. In a form in
single form view the Animal Species combo box would be unbound and the Breed
combo box bound to the Breed field. In a continuous form you can't do it
that way but you can use a hybrid control made up of a text box superimposed
on a combo box. I've posted a demo of various ways of handling this sort of
data at:


http://community.netscape.com/n/pfx...yMessages&tsn=1&tid=23626&webtag=ws-msdevapps


The demo uses geographical data based on English administrative areas and
has three levels, Parish, District and County, but the principle is exactly
the same.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top