Results 1 to 12 of 12
  1. #1
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11

    Unhappy Multi-Table query pulling all fields, not just selected, into results

    Two tables linked by a common field.


    Criteria is limiting results that match a specific number pattern
    Query works... except
    I have only specified a handfull of the fields from the two tables, the results are pulling ALL columns (fields) from the tables.

    This is new behavior to me, I have created similiar queries in the past that only show the fields I select in the results.
    I select each field and add it to the query, I do not drag all fields or the asterisk which does the same thing.

    I have been creating and recreating this query and similiar ones for a week. Unless I delete the columns from my table, which I do not want to do, my query results include every field in the tables.

    Thank you!

  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,521
    What is the SQL of the query?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11
    Sorry, I'm a gui girl, learning as I go, I do not know what you are asking.
    Attached Thumbnails Attached Thumbnails Query.JPG  

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In the upper left corner should be a View icon. Change it to SQL.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Switch the query to SQL View to see the SQL statement.

    Does it have wildcard (*) in the fields selection?

    Copy/paste statement into 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.

  6. #6
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11
    SELECT AllPOExtract.[Item Number], [ANA 53 w BASE table].DESC1, [ANA 53 w BASE table].DESC2, [ANA 53 w BASE table].BASE, [ANA 53 w BASE table].STATUS, [ANA 53 w BASE table].PTREV, AllPOExtract.Site, AllPOExtract.[Purchase Order], AllPOExtract.Supplier, AllPOExtract.[Supplier Name], *
    FROM AllPOExtract LEFT JOIN [ANA 53 w BASE table] ON AllPOExtract.[Item Number] = [ANA 53 w BASE table].ITEM
    WHERE (((AllPOExtract.[Item Number]) Like "#####-###"));

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you miss that * at the end of the field list?

    Welcome to the site by the way. I was just down in your area (Norwalk) visiting my mother-in-law, on the way to LAX.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11
    I see it in the SQL view, I tried removing it, but I get an error. I looked at the Design View and do not understand why the asterisk is there.
    I've been using access for years, this is the first time I've had this issue. How do I get the asterisk out?

    And thank you for the welcome I am an Orange County Native.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You have to remove the comma before it as well.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11
    Ah-Ha! Any idea why after years it started putting that asterisk there?? I'm not doing anything different (that I know of)

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not offhand. I'd guess that you accidentally double-clicked on it when selecting fields.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    Amthyst826 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Location
    Fullerton, Ca
    Posts
    11
    I'm pretty sure that I didn't. I've been working on queries for several weeks with this problem. Thanks for the assist!! I'll go mark this one solved.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-24-2013, 02:38 PM
  2. Replies: 2
    Last Post: 01-21-2013, 11:28 PM
  3. Replies: 7
    Last Post: 06-14-2011, 10:37 AM
  4. Replies: 0
    Last Post: 03-08-2011, 05:56 PM
  5. Does it Matter? Pulling fields in a query
    By Canadiangal in forum Access
    Replies: 1
    Last Post: 10-01-2009, 01:53 AM

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