Results 1 to 3 of 3
  1. #1
    skarden is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    2

    Return all fields even if lookup is empty

    I have 2 basic tables. 1 is Customers and the other is States. I am using the States table as a lookup for the StateID field in the Customers table.

    Since I want to merge this into Word, and have the State name appear, I built a query with the 2 tables linking the Customers.StateID to the States.StateID. However, since I don't have the State for everyone in my Customers table yet, when I run the Query I only get the Customers that have a StateID assigned to them.

    How can I get all Customers and those that have a StateID, it will return the name of the State from the States table?

    Thanks,



    Stuart

  2. #2
    nicknameoscar is offline Advanced Beginner
    Windows XP Access 2000
    Join Date
    Apr 2011
    Location
    Earlysville, VA
    Posts
    91
    My apologies if I have misunderstood your question.

    In the query design view try double clicking on the line that links the tables. (Sorry, I have been using Access for over 3 years but I still can't remember the 'official' names or designations for many Access 'things')

    After you double click on that line experiment with options 2 and 3 in the bottom portion of the message box that appears and see if that gets you the results you want.

  3. #3
    skarden is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    2
    Thanks! I did this and picked option 3, Include all records from Customers and only those recrords from States where the joined fields are equal. Then I included the StateName field from the States table in the query (and *not* the StateID field from the Customers table). Works perfectly!!

    Thanks again,

    Stuart

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

Similar Threads

  1. Check if fields are empty
    By Doggfather22 in forum Forms
    Replies: 3
    Last Post: 12-02-2010, 11:03 AM
  2. Empty Lookup
    By mikel in forum Access
    Replies: 39
    Last Post: 08-07-2009, 01:00 PM
  3. Copying into empty fields until...
    By cochi30 in forum Programming
    Replies: 8
    Last Post: 06-07-2009, 07:38 AM
  4. Hiding fields that contains empty records
    By sakthivels in forum Reports
    Replies: 4
    Last Post: 05-27-2009, 07:06 AM
  5. How to get rows with empty fields as well?
    By Orabidoo in forum Queries
    Replies: 10
    Last Post: 04-24-2009, 06:08 PM

Tags for this Thread

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