Results 1 to 3 of 3
  1. #1
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61

    composite key question

    How do I make sure a customer number is permanently associated with a particular customer?

    Right now, I have a customer ID column (four digit number) but if I delete a row all the numbers ripple up and everything is then wrongly assigned.

    Example:
    0001 Acme Pencils
    0002 John's Sheet Metal
    0003 Fred's Groceries



    If I now delete 0002, I get

    0001 Acme Pencils
    0002 Fred's Groceries

    From 0002 onwards all the customers have the wrong numbers assigned to them.

    I think I need a composite key made from Number and Name but how do you make one? In the design view, I only see Primary Key...

    Thanks - rev

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    composites are made of more than one primary. make one by pushing the primary key button in more than one field

  3. #3
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61
    Thanks!

    (Am I correct in assuming that's the problem/and the fix?)

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

Similar Threads

  1. Replies: 1
    Last Post: 07-27-2010, 08:02 AM
  2. Replies: 3
    Last Post: 07-16-2010, 12:32 PM
  3. composite unique key
    By shital in forum Access
    Replies: 1
    Last Post: 07-09-2010, 08:07 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