Results 1 to 4 of 4
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Creating a unique index on two fields


    I need to create a unique index in a table containing two fields, batch_ID and Product_ID. For each batch, a product should only be submitted one time this should be a unique identifier, a candidate key of sorts I believe. I've received instructions on how to do this, but I'm having trouble. When I click on the index window it pops up with the primary key (auto-number) and several other fields. It won't let me remove the primary key from the list of fields due to existing relationships. How do I create an index with just those two fields?

    p.s. I don't want to change my primary key, I just want to enforce the composite index. I hope that's clear.

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    You can't remove, or change the primary key. But look at my "Quick Tutorial" here:
    http://www.btabdevelopment.com/ts/mfi
    to see how to do this.

  3. #3
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Thumbs up

    I knew this was simple. Thank you.

    Now, tell me why the Access Help was so "helpless"? You don't have to answer that question.

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    I find that pictures simplify things immensely, so that is why I created what I call my "Quick Tutorials."

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

Similar Threads

  1. Replies: 4
    Last Post: 01-14-2016, 02:18 PM
  2. Creating unique ID's
    By quietmortal in forum Queries
    Replies: 1
    Last Post: 09-01-2011, 02:29 PM
  3. Eerror No unique index found
    By newtoAccess in forum Database Design
    Replies: 4
    Last Post: 12-10-2010, 08:30 AM
  4. Replies: 24
    Last Post: 09-01-2010, 02:09 PM
  5. Creating a unique ID for a new set of values
    By slaterino in forum Programming
    Replies: 1
    Last Post: 08-24-2010, 09:35 AM

Tags for this Thread

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