Welcome to SPN

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

Sign Up Now!

Deleting record with all its subforms/relationships

Discussion in 'Information Technology' started by iTanas, Jul 28, 2006.

  1. iTanas

    iTanas
    Expand Collapse
    Guest

    Hello, I have a table thats called Hardware (with Workstation name field) and
    another table thats called Software (with list of softwares), I have a 3rd
    table, Relationship, that is a relationship between these two, so that each
    Workstation has several softwares. When I go ahead and delete a certain
    Workstation, it does not delete the associated softwares for that
    workstation. So when I perform the Delete then in the Relationship I still
    have the dangling softwares that are no longer attached to any workstation
    (that field becomes blank).

    What is the proper way to delete a workstation so that it actually goes and
    removes its associated 'subfields' or softwares that are attached to it in
    relationship table?

    Thanks.
     
  2. Loading...


  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Assuming you've created an actual Relationship between the tables, you can
    enforce Referential Integrity, and have it Cascade Delete.

    Otherwise, you'll have to issue additional DELETE statements when you delete
    the one record.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "iTanas" <iTanas@discussions.microsoft.com> wrote in message
    news:B0DDC738-1928-499C-9B32-84339BEEBA11@microsoft.com...
    > Hello, I have a table thats called Hardware (with Workstation name field)
    > and
    > another table thats called Software (with list of softwares), I have a 3rd
    > table, Relationship, that is a relationship between these two, so that
    > each
    > Workstation has several softwares. When I go ahead and delete a certain
    > Workstation, it does not delete the associated softwares for that
    > workstation. So when I perform the Delete then in the Relationship I
    > still
    > have the dangling softwares that are no longer attached to any workstation
    > (that field becomes blank).
    >
    > What is the proper way to delete a workstation so that it actually goes
    > and
    > removes its associated 'subfields' or softwares that are attached to it in
    > relationship table?
    >
    > Thanks.
     

Share This Page