Results 1 to 4 of 4
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Linking fields between a query and table

    In query design view, I have added a query with column (nameA) of names and a table with a column (nameB) of names. I am linking these two fields (nameA and nameB) which contain names. The names are spelled exactly the same so I should get results. Both fields are of the same data type.



    But even when I add only the field with names from the query (the field called nameA), I don't get any results.

    What is wrong here? Are there restrictions about linking a query to a table?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Queries can join to tables or queries.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265
    Quote Originally Posted by June7 View Post
    Queries can join to tables or queries.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    In the attached database, my problem is with the query called subPayments. The subpayments table has a name "Cardenas, Steven" which also appears in the query called qryTimeCollection. The name is spelled the same in each case, so I don't know why it doesn't appear in the query results.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The problem is with the lookup that is set for the subEmployee field in subPayments. This is why lookup with alias in table is bad idea. The actual value saved in subEmployee field is the billingAccount value CARDENAS1 - not the name Cardenas, Steven. Remove the lookup settings from the table and you will see the true values of the field. http://access.mvps.org/access/lookupfields.htm

    There are no primary keys defined on any table.
    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.

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

Similar Threads

  1. Create a Query that won't mess up when linking a new table
    By DavidMichaelangelo in forum Queries
    Replies: 12
    Last Post: 11-25-2013, 12:24 PM
  2. Replies: 5
    Last Post: 12-19-2012, 07:26 PM
  3. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  4. Fields not Linking to Table
    By jlclark4 in forum Forms
    Replies: 2
    Last Post: 12-20-2010, 08:04 AM
  5. Trouble linking a table to a query
    By wtubell in forum Queries
    Replies: 1
    Last Post: 03-26-2009, 06:34 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