Results 1 to 5 of 5
  1. #1
    paul32 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Feb 2015
    Posts
    4

    Simple query retuning multiple repeated records when none exist

    Hello everyone,

    I've been scratching my head trying to figure this one out. I've created a simple query with one table that looks at a single field (Invoice_Num) and with the criteria "=87161". The query then shows over 40,000 results with the value 87161 repeated in every single result. What is going on? I've had this happen before and I've dealt with it by using the Group By function, but I don't think I should have to do this every time.

    Is this normal query behaviour? Am I missing something fundamental from basic query design? Is there some setting that I accidentally clicked? Thanks, everyone!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    It sounds like you may have put a constant in a place where a field name was expected.

    It would be helpful to readers if you could post the sql of the query. A screenshot or the actual sql is needed to offer more focused answer.

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    In the query criteria, dont use the = or quotation marks.

    Just put 87161 in the criteria box. If the field is text type, Access wil put quotes into the query SQL for you.

  4. #4
    paul32 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Feb 2015
    Posts
    4
    Thanks for your reply! By looking at the SQL I was able to find the problem. I had tables in the query that weren't properly joined.

    Thanks again orange you made me realize what was wrong with my query!

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

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

Similar Threads

  1. merging repeated data on query
    By Pavilion in forum Queries
    Replies: 3
    Last Post: 06-04-2014, 03:33 PM
  2. Query Criteria for repeated Item
    By rashock in forum Access
    Replies: 3
    Last Post: 01-28-2014, 07:38 PM
  3. If no records exist
    By mrwhitehat in forum Reports
    Replies: 1
    Last Post: 08-27-2013, 12:51 AM
  4. Replies: 4
    Last Post: 04-07-2011, 03:16 PM
  5. Hi, How do we avoid repeated records?
    By radicrains in forum Queries
    Replies: 11
    Last Post: 11-04-2010, 03:00 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