Results 1 to 4 of 4
  1. #1
    usmananyc is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4

    Unhappy Cobine two columns to display information in a third column as a Unique Identifier.

    Hello Everyone,

    Im in need of some assistance. So i have a access database with a main field that we can call vendor # (LIFNR) and another called Company code (BUKRS). There are multiple company codes under a single vendor #. Example:

    LIFNR BUKRS
    0000010535 1010
    0000010535 5060
    0000010535 5610
    0000010536 1010
    0000010536 5060
    0000010536 5610



    What i am trying to do is create a 3rd column where i can have a unique row for each of these fields without it repeating. There is no unique identifier in this table and that is what i am trying to achieve. Please help.

    Thanks in advance!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Set the two fields as a compound index to prevent duplicate pairs.

    Do you want to save these values as foreign key in related tables?

    Why don't you use autonumber field as PK and save as FK in related tables?
    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
    usmananyc is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2015
    Posts
    4
    I simply used the concatenate function to combine the text in both columns into a 3rd column. Very simple. Thanks for your help June7.



  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,643
    Yes, concatenation expression does that but why do you need to? Setting compound index on the two fields will prevent duplicate pairs. I've never used Calculated type field in table. Did you set it as Index No Duplicates?
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-05-2015, 03:51 PM
  2. Custom Unique Identifier
    By sstrode in forum Forms
    Replies: 2
    Last Post: 09-17-2014, 05:10 PM
  3. Adding a unique identifier to each record
    By Jessica240 in forum Queries
    Replies: 28
    Last Post: 07-15-2014, 01:42 PM
  4. Replies: 5
    Last Post: 08-02-2012, 08:49 AM
  5. Using Social# as unique identifier
    By NEHicks in forum Database Design
    Replies: 3
    Last Post: 05-27-2011, 09:14 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