Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: Relationship between 2 tables

    Hi:

    Tables:
    I have 2 tables, there are same fields: Name, Date, and Invoice #

    I make a relationship between 2 tables, connect Name, Date, and Invoice #
    And click "Enforce Referential Integrity", "Cascade Update Related Fields", and "Cascade Delete Related Records".

    One-to-One.

    After that, I go table 1, create a record, then close it, then open table 2, the record I created in the table 1 is NOT over there. Does the relationship create record? It only update and delete. What about Add ?
    Please let me know about it. Thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Realtionships are not magic. They don't do actively do anything. What they can do is assist you as developer in ensuring data integrity. They can simplify navigation for non professionals to view their data.

    Depending on how you have defiend your relationship it can ensure that the value child column exists, or it can ensure that there can only be one child record to one parent record.

    Access / JET does not have the capability of adding to a table automatically, such as server engines like MySQL, SQL Server etc. If you want the facility of an automatic row insert based on another insert then you will have to switch to a server, and / or improve your SQL / form design

  3. #3
    Join Date
    Sep 2005
    Posts
    313
    Alright. Thanks.

    I need to fix that in the forms.
    Thanks.

  4. #4
    Join Date
    Jan 2005
    Posts
    31
    Quote Originally Posted by accessman2
    Hi:

    Tables:
    I have 2 tables, there are same fields: Name, Date, and Invoice #

    I make a relationship between 2 tables, connect Name, Date, and Invoice #
    And click "Enforce Referential Integrity", "Cascade Update Related Fields", and "Cascade Delete Related Records".

    One-to-One.

    After that, I go table 1, create a record, then close it, then open table 2, the record I created in the table 1 is NOT over there. Does the relationship create record? It only update and delete. What about Add ?
    Please let me know about it. Thanks.
    Cascade Update and Delete do just those actions.

    Referential Integrity does not include the idea of Cascading Inserts.

    MS-Access has poor support for this type of set up. It must be enforced very carefully at the business logic layer (even though the DB really should be taking care of it), and kept out of the GUI layer at all costs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •