Select diff value from drop down in subform, it changes all occurences in DB

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sabra D via AccessMonster.com

    Select diff value from drop down in subform, it changes all occurences in DB


    I have a db with 3 tables, owner, lessee, and tract, tract is the main table
    and has two lookup fields to find the owner and lessee info.
    My problem - i have a form with the owner info on top and the tract info
    (including lessee) in a subform below. When i change the lessee on the form,
    it changes all of them in the entire database. I looked but couldn't find
    anything about this on your site. I'm at a loss, i'm sure it's something i
    set up wrong but can't figure it out. Please help. Thank you.


    --
    Message posted via AccessMonster.c om

  • Sabra D via AccessMonster.com

    #2
    Re: Select diff value from drop down in subform, it changes all occurences in DB


    Sabra D wrote:[color=blue]
    >I have a db with 3 tables, owner, lessee, and tract, tract is the main table
    >and has two lookup fields to find the owner and lessee info.
    >My problem - i have a form with the owner info on top and the tract info
    >(including lessee) in a subform below. When i change the lessee on the form,
    >it changes all of them in the entire database. I looked but couldn't find
    >anything about this on your site. I'm at a loss, i'm sure it's something i
    >set up wrong but can't figure it out. Please help. Thank you. I did find something on your site, about the combo box being bound, it is so that's not the problem.[/color]


    --
    Message posted via AccessMonster.c om

    Comment

    • pietlinden@hotmail.com

      #3
      Re: Select diff value from drop down in subform, it changes all occurences in DB

      do you have relationships set up? Are your fields bound?
      the relationships may look something like this:

      Owner--(1,M)---Tract---(1,M)---Lessee

      Owner(OwnerID(P K), Name...)
      Tract(TractID(P K), Location...)
      Lease(LeaseID(P K), TractID (FK), LeseeID(FK), LeaseStart, LeaseEnd)
      Leasee(LeaseeID (PK), Name, Address...)

      Main Form could be either Lease or Tract. (Probably Lease)
      Combobox for Tract and either a subform or combobox for Leasee -
      depending on your business rules.

      Stuff to check:
      1. The Master/Child relationship stuff in your form. they should NOT
      be blank!
      2. the relationships window. There should be relationships established
      between your tables, then the forms should follow that.

      Comment

      • Sabra D via AccessMonster.com

        #4
        Re: Select diff value from drop down in subform, it changes all occurences in DB


        OK, checked relationships, the tract is related to the others by the "lessor
        id" and "lessee id", which is "id" in the respective table, i think that is
        how it should be and master/child shows this correctly. You say i should
        have the main form be lease or tract (which i have in a different table) but
        i want to see what each owner has so i set it up to have the owner as the
        main form (so i could search by name) with the tract info below in a subform -
        is that the problem? Because of the way i have the tracts set up (because
        that's how it needs to be), it has a many to one relationship with lessee
        (one lessee per tract) but the same lessee can have multi tracts (isn't that
        right?). I don't need to set out the lease separate from the tract, it can
        be in the same table and i prefer it that way (is that a problem?). So, now
        that i've explained a little more, any other suggestions? Oh, and yes, my
        lessee field is bound to the lessee table (is that how it should be?).

        pietlinden@hotm ail.com wrote:[color=blue]
        >do you have relationships set up? Are your fields bound?
        >the relationships may look something like this:
        >
        >Owner--(1,M)---Tract---(1,M)---Lessee
        >
        >Owner(OwnerID( PK), Name...)
        >Tract(TractID( PK), Location...)
        >Lease(LeaseID( PK), TractID (FK), LeseeID(FK), LeaseStart, LeaseEnd)
        >Leasee(LeaseeI D (PK), Name, Address...)
        >
        >Main Form could be either Lease or Tract. (Probably Lease)
        >Combobox for Tract and either a subform or combobox for Leasee -
        >depending on your business rules.
        >
        >Stuff to check:
        >1. The Master/Child relationship stuff in your form. they should NOT
        >be blank!
        >2. the relationships window. There should be relationships established
        >between your tables, then the forms should follow that.[/color]


        --
        Message posted via AccessMonster.c om

        Comment

        • Sabra D via AccessMonster.com

          #5
          Re: Select diff value from drop down in subform, it changes all occurences in DB


          You were right, it had to do with my relationships. Got it fixed, thanks for
          all the help.

          pietlinden@hotm ail.com wrote:[color=blue]
          >do you have relationships set up? Are your fields bound?
          >the relationships may look something like this:
          >
          >Owner--(1,M)---Tract---(1,M)---Lessee
          >
          >Owner(OwnerID( PK), Name...)
          >Tract(TractID( PK), Location...)
          >Lease(LeaseID( PK), TractID (FK), LeseeID(FK), LeaseStart, LeaseEnd)
          >Leasee(LeaseeI D (PK), Name, Address...)
          >
          >Main Form could be either Lease or Tract. (Probably Lease)
          >Combobox for Tract and either a subform or combobox for Leasee -
          >depending on your business rules.
          >
          >Stuff to check:
          >1. The Master/Child relationship stuff in your form. they should NOT
          >be blank!
          >2. the relationships window. There should be relationships established
          >between your tables, then the forms should follow that.[/color]


          --
          Message posted via http://www.accessmonster.com

          Comment

          Working...