Results 1 to 2 of 2
  1. #1
    sgp667 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    17

    Combining records from multiple tables into one query


    Hi guys how can I combine records from different tables into one query?

    For example I need a query for a form that shows client's balance history, where Invoices/Bills and Payments are coming from two different tables.
    Here is an example how this might look on the report:

    1/1/2012 Invoice $500
    1/8/2012 Payment $250
    2/1/2012 Invoice $500
    2/8/2012 Payment $750

    Like I say Invoices would come from one table and Payments from another, and because it is relevant to another project of my lets assume that I cannot combine the two tables into one.

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A UNION query could probably get that output, something like:

    SELECT DateField, "Invoice" AS Type, Amount FROM Invoices
    UNON SELECT DateField, "Payment", Amount FROM Payments;

    There is no designer for UNION, must type into the SQL view window.
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  2. Help with Combining multiple Records
    By Jennivere in forum Queries
    Replies: 1
    Last Post: 11-28-2011, 08:05 PM
  3. Replies: 1
    Last Post: 06-24-2011, 10:22 AM
  4. combining multiple tables in to one master
    By joebox8 in forum Queries
    Replies: 5
    Last Post: 06-23-2011, 06:18 AM
  5. Combining multiple tables
    By Duncan in forum Access
    Replies: 1
    Last Post: 03-27-2011, 08: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