Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Linking Fields within a Table!

Discussion in 'Information Technology' started by yellow_polkadot_tractor@hotmail.com, Jul 28, 2006.

  1. yellow_polkadot_tractor@hotmail.com

    Guest

    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
     
  2. Loading...


  3. Rick Brandt

    Rick Brandt
    Expand Collapse
    Guest

    <yellow_polkadot_tractor@hotmail.com> wrote in message
    news:1151164504.338950.114520@r2g2000cwb.googlegroups.com...
    > 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

    --
    Rick Brandt, Microsoft Access MVP
    Email (as appropriate) to...
    RBrandt at Hunter dot com
     
  4. Ken Sheridan

    Ken Sheridan
    Expand Collapse
    Guest

    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

    "yellow_polkadot_tractor@hotmail.com" wrote:

    > 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
    >
    >
     

Share This Page