Results 1 to 3 of 3
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    table and query results

    All, using access 2013. I have a query from a table that I want to join in another table to pick up the sub accts for customers based on custid and state. Ex.
    qrycust


    Code:
    custid custstate
     cust1234 VA
    tblcustsub
    Code:
    qrycustid qrycuststate
    cust1234  VA
    cust1234A  VA
    Desired results:
    qrycustsub
    Code:
    qrycustid  qrycuststate
    cust1234  VA
    cust1234A  VA
    qrycust are the results from tblcust filtered by some criteria. tblcust does not contain the sub accts for customers. the sub accts are only in tblcustsub. I want all the customers in the qrycust and only matching from the tblcustsub but also the sub accts listed in the Desired results example. My query now only picks up the custid but not the cust sub accts because I don't have the sub accts in qrycust. How can I acheive the results I need?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    You can backfill the master table...
    run a query to pull only the custID from the child table,
    put these in the master table with an append query.
    now the master table has ALL custIDs, so join the 2 tables and get the child records.

  3. #3
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Thanks. Was trying to avoid manipulating the master table but makes since. Thanks again.

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

Similar Threads

  1. Replies: 3
    Last Post: 02-22-2016, 03:38 PM
  2. Replies: 5
    Last Post: 05-21-2013, 02:21 PM
  3. Replies: 2
    Last Post: 03-25-2013, 09:10 AM
  4. Replies: 0
    Last Post: 02-24-2010, 12:56 AM
  5. Combine Query Results to One Table
    By pr4t3ek in forum Queries
    Replies: 0
    Last Post: 12-19-2008, 06:37 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