Results 1 to 3 of 3
  1. #1
    nguyenak is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    23

    Booleen Test (True or False) Statement comparing cells below

    Hello,
    I dont know how to accomplish the following in Microsoft Access.
    Here is the current Table

    Customer


    Type


    ProductName


    SKU
    Jim Product - Single PS10 1006423
    Jim Product - Single CY150 1006430
    Jim Product - Single TYS3 1007003
    Jim Product - Single ProductA COLOR 1007005
    Jim Product - Single ProductA 1007005
    Jim Product - Single 250M 1007115


    Goal
    Customer Type ProductName SKU T/F
    Jim Product - Single PS10 1006423 F
    Jim Product - Single CY150 1006430 F
    Jim Product - Single TYS3 1007003 F
    Jim Product - Single ProductA COLOR 1007005 F
    Jim Product - Single ProductA 1007005 T
    Jim Product - Single 250M 1007115 F


    In excel, i create column (T/F) and the logic is d3=d2 (Looking for same sku with different ProductName) and then I drag it down to find my results.

    How would I accomplish this in MS Access?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    One way might be with subquery.
    Review http://allenbrowne.com/subquery-01.html
    Look at the examples for Aggregation: Counts and Totals, Get the value in another record

    Another could be with DCount. Is the SKU field a text or number type? Create field in query with expression like:
    IIf(DCount("SKU","tablename","SKU=" & [SKU] & "ProductName<>'" & [ProductName] & "'")>0,"T","F")
    This should return T for both 1007005 records.
    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
    nguyenak is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    23
    Works Great!...thanks June

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

Similar Threads

  1. iif statement comparing two fields
    By unslog in forum Access
    Replies: 6
    Last Post: 09-28-2012, 02:13 PM
  2. Multiple True/False columns, forcing behaviour
    By RoscreaMou in forum Access
    Replies: 8
    Last Post: 05-08-2012, 04:24 PM
  3. Replies: 7
    Last Post: 01-11-2012, 12:24 PM
  4. Yes/No True/False
    By DSTR3 in forum Access
    Replies: 5
    Last Post: 12-04-2010, 05:56 PM
  5. True or false
    By tleec in forum Queries
    Replies: 1
    Last Post: 02-01-2008, 10:41 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