Results 1 to 3 of 3
  1. #1
    Huddle is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Jun 2010
    Posts
    318

    Master Query indicating which tables are used


    My database has multiple tables that are populated by excel sheets out of the system.

    Example: Approved, Assessment, Assn_Not_Started, LESPM, PNF, Review1, Review2,Revise and Target

    Each table is populated with building numbers.

    What I want to do is create a query with the building number and the table it resides in.

    CO0046 Approved
    CO4538 LESPM
    CO5774 LESPM
    CO5544 PNF

    Is this possible?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,923
    Possibly a UNION query. Assuming each table has BuildingNo and unique ID fields, consider:

    SELECT ID, BuildingNo, "Approved" FROM Approved
    UNION SELECT ID, BuildingNo, "Assessment" FROM Assessment
    UNION SELECT ID, BuildingNo, "AssnNotStarted" FROM Assn_Not_Started
    UNION SELECT ID, BuildingNo, "LESPM" FROM LESPM
    UNION SELECT ID, BuildingNo, "PNF" FROM PNF
    UNION SELECT ID, BuildingNo, "Review1" FROM Review1
    UNION SELECT ID, BuildingNo, "Review2" FROM Review2
    UNION SELECT ID, BuildingNo, "Revise" FROM Revise
    UNION SELECT ID, BuildingNo, "Target" FROM Target;
    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
    Huddle is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2010
    Posts
    318
    It did work with a Union Query. Thanks

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

Similar Threads

  1. Replies: 7
    Last Post: 11-21-2017, 10:13 AM
  2. Replies: 3
    Last Post: 01-02-2014, 02:07 PM
  3. Replies: 5
    Last Post: 08-22-2013, 04:32 PM
  4. combining multiple tables in to one master
    By joebox8 in forum Queries
    Replies: 5
    Last Post: 06-23-2011, 06:18 AM
  5. Replies: 9
    Last Post: 12-17-2010, 01:04 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