Results 1 to 4 of 4
  1. #1
    Darla is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2016
    Posts
    25

    Returning A Value Based On Whether Or Not There Is A Duplicate Value

    Hello everyone! I have a query that returns a value based on a value in another field of a table. However, I'd like to return a value based on whether or not "FieldA" has a duplicate anywhere in the table.



    Ex: If FieldA = "Check Out", then FieldB = "Yes", Otherwise If FieldC has a value of "17" in more than 1 record in the table, FieldB = "No"


    Is this possible? Am I trying to accomplish it the right way? Any direction or insight is helpful, thank you!

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    What if FieldA = "Check Out" and FieldC has a value of "17" in more than 1 record in the table
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Darla is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2016
    Posts
    25
    I don't really see any instances where that would happen in our situation.

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    If Me.FieldA = "Check Out", then
    Me.FieldB = "Yes"
    Else
    If DCount("FieldC", "YourTableName", "FieldC = 17") > 1 then
    Me.FieldB = "No"
    End If
    End If




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

Similar Threads

  1. Replies: 2
    Last Post: 02-11-2015, 08:16 AM
  2. Replies: 2
    Last Post: 12-27-2013, 05:20 PM
  3. Replies: 6
    Last Post: 06-18-2012, 05:11 PM
  4. Replies: 7
    Last Post: 02-25-2012, 07:32 PM
  5. Replies: 0
    Last Post: 04-18-2011, 01:01 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