Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    30

    Unanswered: Preventing Duplicate Table Entries

    All,

    Following Access (2003) help on preventing duplicate table entries, I made a multi-field index and set its unique property to "yes". On a small database that I use for testing, this works great. However, on the "real" database I am getting duplicate entries. In both cases the index fields are text. In fact the only fundamental difference is that the "real" database index has 7 fields, while the test database index has only 2.

    I have checked and rechecked to make sure that the indices were set up in the same way. I cannot figure out why I am getting the duplicate entries. I am considering remaking the offending table from scratch. I know this is a desperation move, but I can't think of anything else.

    I would appreciate your suggestions.

    Thanks,

    Charles

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what does "i am getting duplicate entries" mean?

    were you successful in declaring the 7-field unique index? if so, are you suggesting that duplicates snuck in there after you did that?

    or are you saying that you cannot declare the the 7-field unique index because the table already contains duplicates?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    May 2006
    Posts
    30

    Duplicate Table Entries

    I deleted all of the records in the table and then made the multi-field index.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    and then what happened?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Cool

    [QUOTE=eliascm]All,

    Hi Charles,

    It might seem trivial, but in your Table, did you set your PrimaryKey Indexed property to : Yes (No Duplicates)??? I have seen that not being done in numerous occassions. Just a thought.

    have a nice one,
    BUD

  6. #6
    Join Date
    May 2006
    Posts
    30

    Duplicate Table Entries

    Thanks for the suggestion. I am at home today and cannot check the table in question, but I am 99% certain that the master key is set for no duplicates, etc. I'll check tomorrow when I return to work.

    Charles

  7. #7
    Join Date
    May 2006
    Posts
    30

    Duplicate Entries

    Quote Originally Posted by r937
    and then what happened?
    I then used the database in such a way that the table in question would have duplicate entries if it weren't working as planned. It did have duplicate entries.

Posting Permissions

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