Results 1 to 6 of 6
  1. #1
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85

    Each record in the table must have a unique combination of certain fields


    I want to make the combination of three fields only in the record to be unique. 1 out of the three fields can be different from the others but all three cannot be the same in each record. I need each record in this table to have a unique combination of these three fields. How would I do that? I tried the index feature but it didn't work. Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Setting compound index should do that. Why didn't it work - what happens?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Make a key field ,
    run an update query to combine the 3 fields.
    key the field,
    save.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Save data dependent on other data? Should not be necessary.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    I tried the index feature but it didn't work.

    If 'didn't work' means it wouldn't allow you to create it, it will because you already have data that breaks the requirement - review your data and correct as necessary
    It should look like this
    Click image for larger version. 

Name:	image_2022-02-15_120901.png 
Views:	20 
Size:	29.5 KB 
ID:	47275

  6. #6
    HansBades is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2021
    Posts
    85
    Thank you all. I got it working now. Really appreciate the advice.

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

Similar Threads

  1. Replies: 10
    Last Post: 07-01-2014, 11:05 AM
  2. Combination of the 3 fields has to be Unique.
    By sakmsb123 in forum Access
    Replies: 5
    Last Post: 06-05-2014, 07:16 AM
  3. Unique table per record?
    By Poepol in forum Access
    Replies: 8
    Last Post: 06-11-2011, 10:31 AM
  4. Replies: 3
    Last Post: 08-25-2010, 07:04 AM
  5. Prevent Duplicate Values on Combination of Two Fields
    By LornaM in forum Database Design
    Replies: 8
    Last Post: 05-05-2009, 11:16 PM

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