Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Boise, Idaho, USA
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form 'doubling' records & duplicate record error (2002)

    I have 2 problems - If I should post them separately please let me know.
    They both concern the same form.

    1. when the form opens it is in regular edit mode to show all the records. The problem is each record shows up twice. If I run the SQL behind the form I get the correct number with no duplication. What would cause the records to show up twice on the form?

    2. When I save a new record I use unbound fields and add records with "Recordset.Add New" in the code behind the save button. The record saves just fine but then when I try to go back to view the records I get the message that "The changes .... were not successful because they would create duplicate values ..." etc.
    I don't understand why I would be getting that message when the record is already saved and I'm only trying to return my form to edit mode. (I use a subroutine that changes data entry back to false"

    I would be happy to provide additional information if required to understand what the heck I'm doing...
    Any help to resolve these problems would be appreciated.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: form 'doubling' records & duplicate record error (2002)

    Hi Deb

    Just as an investigative question, is there a relationship between tables that the query is running from?
    Jerry
    Jerry

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: form 'doubling' records & duplicate record error (2002)

    1. If you see duplicates in the form, I suspect you've got some kind of unintended join. This can happen if you have a parent form bound to a recordset and a child form bound to the same recordset or table. You can wind up doubling the items you see if the child form quite easily.

    2. This one sounds like a design issue. If add a new record to the recordset, you need to requery the recordset. If the parent and child forms are bound to the same recordset, you're likely to run into problems.

    You might want to give more details about your form and query structure or even post a stripped down database with the form and query in it.
    Charlotte

Posting Permissions

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