Results 1 to 2 of 2
  1. #1
    HectorH is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    14

    Fill in blanks from another table

    How do you replace blank fields in one table with entries from another table. I have been using fields from table A and repacing with table B

    Selct a.name, iif (a.location<> "",a.location,b.location) from


    table a, table b
    where b.location = (Select b.location from table b, table a where a.name = b.name)

    I am not returing any rows

    Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Try this shot in the dark:

    Select a.name, iif (a.location<> "",a.location,b.location)
    from table a INNER JOIN table b ON a.name = b.name

    adding the actual table names of course. If the field is Null, I'd use the Nz() function instead of the IIf().
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Auto-fill one field from another table
    By tasoper in forum Access
    Replies: 3
    Last Post: 06-13-2014, 07:17 AM
  2. Fill table with query?
    By brc in forum Reports
    Replies: 0
    Last Post: 03-15-2011, 02:54 AM
  3. SQL Update with blanks
    By Tyork in forum Programming
    Replies: 1
    Last Post: 12-17-2010, 10:12 AM
  4. Auto fill a table?
    By newtoAccess in forum Access
    Replies: 3
    Last Post: 11-21-2009, 08:21 PM
  5. Adding columns that contain blanks.
    By Tony McGuire in forum Access
    Replies: 11
    Last Post: 05-31-2009, 12:58 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