Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding a record adds an unwanted record in a code (Access2000)

    I have the following tables, tblAudit and tblCriteria. The first records companies and period of audit, the second contains the criteria against which they will be audited. The audit period determines which criteria apply.
    Results are recorded in a third table, tblAuditResults.

    Relationships
    tblAudit 1:M tblAuditResults M:1 tblCriteria

    My problem is when I try to add a new result by selecting a criteria via a combo box a new row is inserted in the criteria table as well as in the result table. Inserting a row in the criteria table is wrong.

    I have attached the database for you to look at.

    Thanks for any advice you can offer.

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

    Re: Adding a record adds an unwanted record in a code (Access2000)

    The combo box should be bound to CriteriaKey (the primary key in tblCriteria), not to CriteriaText. See attached version (I have also renamed some controls).

  3. #3
    New Lounger
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a record adds an unwanted record in a code (Access2000)

    Hans

    Thankyou very much for your help. I am studying the differences between your solution and mine now.

    Thanks

Posting Permissions

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