Results 1 to 5 of 5
  1. #1
    Asphyz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    3

    Query Issue with Multiple Tables

    Hi there,



    Basically I am trying to construct a query that will read multiple tables. I have 3 tables based on Devices, Laptops and Mobiles with information about each piece of equipment and which employeeID has that equipment.

    I want to construct a query which pulls information from each table on the different equipment linked to an employeeID. Now the problem is Access will only seem to display people with equipment in every table, so somebody who just has a mobile and laptop is not being displayed because they don't have a device.

    Can anybody aid me in trying to figure out what I am doing wrong? Many Thanks.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,847
    Quote Originally Posted by Asphyz View Post
    Hi there,

    Basically I am trying to construct a query that will read multiple tables. I have 3 tables based on Devices, Laptops and Mobiles with information about each piece of equipment and which employeeID has that equipment.

    I want to construct a query which pulls information from each table on the different equipment linked to an employeeID. Now the problem is Access will only seem to display people with equipment in every table, so somebody who just has a mobile and laptop is not being displayed because they don't have a device.

    Can anybody aid me in trying to figure out what I am doing wrong? Many Thanks.
    Can you show us what you tried? What result did you get?
    What is your table and relationship structure?

  3. #3
    Asphyz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    3
    Each employee has their own ID so I have linked the tables together via using that.

    The problem is not everybody has the piece of equipment, so for example 1 ID may have 2 items but not a mobile, so their employee ID does not exist in the mobile table.

    I have tried adding an EmployeeID into the mobile table who doesn't have one and just filling the mobile information in as Null and this worked, it displayed the information about the kit they do have and just filled in the mobile section as Nulls.

    But of course I would rather Access do this automatically. In an ideal world what I want is for access to update the fields in the queries that are blank as blanks so the query displays correctly.

    Sorry if I haven't explained everything well, I am a bit of an Access noobie.

  4. #4
    stmoong is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Location
    Singapore
    Posts
    108
    I assume you have an Employee table that is linked to the other three tables.

    When you link the tables, Access creates inner join by default, i.e. only rows with matching values in the joined field will be displayed.

    You need to double-click on the join and change it to left outer join (option 2) if you Employee table is on the left joining Device, Mobile, Laptop tables on the right. Basically, you want to include all rows from Employee table, and only those rows from the other tables matching the Employee Id field.

  5. #5
    Asphyz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    3
    Thank you so very much, that worked perfectly.

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

Similar Threads

  1. Query criteria, multiple tables
    By Vicker in forum Queries
    Replies: 2
    Last Post: 08-16-2011, 01:44 AM
  2. Query Multiple Tables
    By Tomfernandez1 in forum Queries
    Replies: 1
    Last Post: 02-04-2011, 09:31 PM
  3. Can I query multiple tables
    By Sarge, USMC in forum Queries
    Replies: 2
    Last Post: 10-28-2010, 09:54 PM
  4. Query from multiple tables
    By ambidextor in forum Queries
    Replies: 1
    Last Post: 02-25-2010, 08:01 AM
  5. Query problem with multiple tables
    By DanW in forum Queries
    Replies: 1
    Last Post: 11-20-2009, 06:23 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