Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Incomplete Record (2003)

    I created a database to control the location of tools, with a lot of help from Hans V see <post#=477754>post 477754</post#>. The database has been working ok. Someone has entered a record incorrectly, and we need to delete it. However, deleting the record in the main form, does not delete the underlying records concerning the movement of the tool. How can I get round this. Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Incomplete Record (2003)

    The best way to do this is to edit the relationship between the main table and the sub table (double click the line in the Relationships window).
    Make sure that Enforce Referential Integrity and Cascade Delete Related Records are ticked.
    When you delete a record from the main table, related records from the subtable will be deleted too.

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Incomplete Record (2003)

    I can't see how this is working. The subform is based on a query. When I looked at the relationships, there aren't any, and it won't let me set them. Both tables have an ID, but the relationships need to be with the tool number.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Incomplete Record (2003)

    If there is no relationship between the tables, you should create one, but you'll have to clean up the data first. Access won't let you create a relationship with enforced referential integrity as long as there are records that violate the rules, i.e. records in the subtable with a tool number that doesn't occur in the main table.
    You can use the Find Unmatched Query Wizard to hunt for offending records.

Posting Permissions

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