Results 1 to 5 of 5
  1. #1
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65

    iff Statement Between 2 queries.


    Is it possible or what is the best way if i want to compare 2 queries on specific collums. If they match it would return Y if not a N. So if qryIBLOS [SHPMT_NBR] matches qryFluidASNs [UNVERF_FLUID] a Y would show if not a N would return. Any Ideas out there?

  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,638
    Are these the common ID fields that link the two 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.

  3. #3
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    I can make them that way I need to view all items in qryIBLOS though qryFluidASNs has just a few items

  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,638
    Options:
    1. create another query that joins these two, join type "Show all records from qryIBLOS...", create a field with expression -
    IsMatch: IIf([SHPMT_NBR]=[UNVERF_FLUID],"Y","N")

    2. use DLookup() in expression in qryIBLOS, assuming SHPMT_NBR is text value -
    IsMatch: IIf(IsNull(DLookup("UNVERF_FLUID", "qryFluidASNs","SHPMT_NBR='" & [SHPMT_NBR] & "'")), "N", "Y")
    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.

  5. #5
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    You are good my Friend!!!

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

Similar Threads

  1. Replies: 5
    Last Post: 03-03-2013, 07:18 AM
  2. Need help with a Like statement
    By itm in forum Queries
    Replies: 3
    Last Post: 10-22-2012, 12:55 PM
  3. if statement in sql statement, query builder
    By 54.69.6d.20 in forum Access
    Replies: 4
    Last Post: 09-11-2012, 07:38 AM
  4. IIF statement Help
    By SobJim in forum Queries
    Replies: 10
    Last Post: 04-22-2012, 07:23 AM
  5. Replies: 7
    Last Post: 08-17-2011, 01:49 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