Results 1 to 2 of 2
  1. #1
    joreyn is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    1

    Post Linked Tables and returning blanks

    Hi All,



    I have a table which has an ID number in it and I have linked it to another table to pull through matching data like a name. I am looking to have the list of ID's for the day and when I run the query the full list of ID's is in the return regardless whether it pulls information through or not. So for example, say I have ID's 000123, 000456, 000789, 001230 & 004560 and I want to find a customer name for each of them but a name might not exist, how can I get all query to return each of the ID's some with names, some without but all in the same order? so it would look like this:

    Customer ID Customer Name
    000123 Mr Fred Jones
    000456 Mrs Mary Smith
    000789
    001230 Mr John Frank
    004560


    Any help would be appreciated as a Google search didn't help

    Thank you in anticipation

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    you need an outer join to do this:

    select [ID], [CustomerName], ... from [tableName1] left outer join [tableName2] on [tableName1].[ID] = [tableName2].[NameForeignKeyField]

    kr
    NG

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

Similar Threads

  1. Query with Blanks and Non-Blanks
    By getalinks in forum Queries
    Replies: 14
    Last Post: 05-21-2015, 03:30 PM
  2. Replies: 4
    Last Post: 11-22-2013, 11:20 AM
  3. Replies: 1
    Last Post: 08-01-2013, 08:47 AM
  4. Replies: 1
    Last Post: 05-04-2013, 05:16 PM
  5. Replies: 5
    Last Post: 02-02-2012, 06:42 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