Results 1 to 9 of 9
  1. #1
    nizam is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    24

    To Avoid Duplicate Entries in 2 different columns in Access Table / Qurey

    Dear Friend,


    Kindly advise me that is it possible to set the Access Query / Table inoder to that, " Column A" and "Column B" should not allow for duplicate entry.

    Not in the same column (Indexed).

    I need the buid like the datas i am entering in Filed A should not be the same as the Data entering in the Field B.

    If possible for this please advise me

    Thanks in advance

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Make a UNIQUE INDEX on fields FieldA and FieldB.
    This would be a composite index that is Unique and Do Not Allow Nulls.

    See this for an example
    http://www.geeksengine.com/article/c...ex-access.html

  3. #3
    nizam is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    24
    Dear Thanks for the reply,
    But i need to avoid the duplication of entries in different columns in the same table..?
    how to avoid this ?
    plz reply

  4. #4
    nizam is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    24
    Dear Thanks for the reply,
    But i need to avoid the duplication of entries in different columns in the same table..?
    Means if the values/data are available in the Column A and same Values / data should not come in the column B when entering datas in column B.


    how to avoid this ?
    plz reply

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    This could be done by data validation on a form. If you are entering data directly into table, cannot control this.
    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.

  6. #6
    nizam is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    24
    I am entering through a qurey from that table.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Query same as table. Cannot code behind query. However, can set ValidationRule and ValidationText properties in a table. But doubt they will be able to handle validation based on value in another field. Seems I have tried that. Will most likely need to build form and use VBA for validation.

    Are you the only user of this db? Developers do not build projects that allow users to interact with tables and queries.
    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.

  8. #8
    nizam is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    24
    I am the only user for this DB. i developed this one for controlling my project activities.
    why this is importanat to me is that, i need the enter the report numbers of some testing we are doing for our job.
    So for these tests, the report numbers for each test should be unique, ( For Eg:- For "Activity 1" if test 1 is not accepted, test 2 have to perorm, or test 3,)
    for this one i need this

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Info does not alter our comments.

    Custom unique identifier common topic. Review this one https://www.accessforums.net/access/...ber-20506.html
    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: 15
    Last Post: 11-08-2012, 10:09 AM
  2. Hot to set Password for Access 2007 Qurey
    By nizam in forum Queries
    Replies: 1
    Last Post: 12-23-2011, 03:01 AM
  3. Replies: 1
    Last Post: 12-09-2011, 07:34 AM
  4. Replies: 2
    Last Post: 04-20-2011, 06:59 AM
  5. validation setting for duplicate entries
    By noweyout in forum Forms
    Replies: 1
    Last Post: 02-18-2011, 06: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