Results 1 to 4 of 4
  1. #1
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14

    QRY Linked TBLS, bring up info on TBL 1, and any info on TBL 2 with certain status

    Hi there,

    I've created a report that brings up all associated information for a selected record, and any information from a second table with a certain status. When there isn't any information on the second table with that status, it won't display any of the information from the first table..



    What I'm trying to achieve is to display the information from the first table, and IF there is any associated records on the second with that stauts, bring that up too, but if not, then just display the info from the first table and leave the other fields blank.

    Essentially the report is blank if there isn't any information on the second table with that status. I've messed with the JOINS as well as pretty much everything else I could think of to get it to work - to no avail..

    Please Help!! Here is an example of the code:

    Code:
    SELECT brews.brewID, brews.style, brews.KOs, [recipeDefinitions].[quantity]*[brews].[KOs] AS [DryHop-lbs], recipeDefinitions.ingredientName, recipeDefinitions.quantity, recipeDefinitions.recipeID, recipeDefinitions.stage
    FROM brews LEFT JOIN recipeDefinitions ON brews.recipe = recipeDefinitions.recipeID
    WHERE (((recipeDefinitions.stage)="DH"));

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Query is working properly. The WHERE criteria applies to each record of the joined dataset, not just the recipeDefinitions table.

    Do a query that filters recipeDefinitions.

    Join that query to brews table with join type "Include all records from brews ..."
    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
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14
    Sweet, I'll give that a shot right now.. thanks for the quick reply!

  4. #4
    neockder is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    14
    Woohoo! Thanks June. Works exactly how I need it to. I owe you a beer

    mark as Solved?

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

Similar Threads

  1. Where Can I Get Info On Modules
    By aamer in forum Access
    Replies: 1
    Last Post: 08-24-2012, 11:33 PM
  2. Replies: 3
    Last Post: 01-31-2011, 11:47 AM
  3. AutoNumber Info
    By anoob in forum Access
    Replies: 3
    Last Post: 01-12-2011, 05:35 PM
  4. Cannot input info
    By Don1 in forum Access
    Replies: 3
    Last Post: 12-14-2010, 04:17 AM
  5. SQL- retrieving info
    By jmarti57 in forum Programming
    Replies: 0
    Last Post: 12-10-2008, 03:05 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