Results 1 to 6 of 6
  1. #1
    JRodko is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    127

    Duplicate value within primary key field.

    I have never seen this before in my hundreds of other records. I have a text value, lets call it "VALUE19-19c1" which shows up fine as the primary key or foreign key in any tables which it is used.

    For some reason when I try to filter on that it shows up as a duplicate within that field separated by a space. So down the list is "VALUE19-18", "VALUE19-18A", "VALUE19-19", "VALUE19-19C1 VALUE 19-19C1".

    There are no spaces in it. It's exactly like that, but I don't know why it shows up like this. Whatever is causing this error is also making several of my queries and saved exports not function at all.

    Help would be very appreciated.

    Thank you.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    how is this primary key created? user input? a calculation?

  3. #3
    JRodko is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    127
    It's user input every time. Short text.

  4. #4
    JRodko is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    127
    I have fixed it. A user pressed enter and duplicated it. I thought I had refilled the field to check for that but apparently I was no successful.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    that is what I was going to suggest.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I would advise to never store data this way if it can be helped. I have seen Access try to subtract 2 values even if they are not numbers. If B can be greater than A, or B can equal B, it stands to reason that there can be an attempt to subtract B from A. If you must, consider setting an unique index and use an autonumber field as the PK.

    My guess is that your example is just that and that it isn't exactly what you have but I have to base my answer on what you show.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-28-2019, 03:49 PM
  2. Replies: 4
    Last Post: 01-25-2017, 07:56 AM
  3. Replies: 3
    Last Post: 09-21-2015, 08:10 PM
  4. Replies: 4
    Last Post: 04-19-2012, 11:01 AM
  5. Replies: 37
    Last Post: 08-10-2011, 09:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums