Results 1 to 5 of 5
  1. #1
    Zerdan is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2011
    Posts
    15

    Limiting Duplicates


    I have a query that is display results in a form and there are duplicate entries for a couple items for some reason that are appearing in the results. The table that I'm querying I do not have write privileges so I can't just delete the duplicates, so I will need to filter them out in the results.

    I have read about SELECT DISTINCT but have not been able to get it to work. I'm using Access 2003. Any suggestions on ways to do this? Thank you.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    What can't you get working with Select Distinct?
    Show us the code.

  3. #3
    Zerdan is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2011
    Posts
    15
    I have multiple tables joined in the query so my SELECT statement is quite long. It errors when I add this though:

    Code:
    SELECT DISTINCT dbo_MasterData.OrderNumber FROM
    The error it gives is Syntax error (missing operator) in query expression 'DISTINCT dbo_MasterData.OrderNumber'.

    The code looks like this right now and it works, but there are duplicate order numbers that I'm trying to filter:

    Code:
    SELECT dbo_MasterCustomer.CustomerCity, dbo_MasterCustomer.CustomerFirstName, dbo_MasterCustomer.CustomerLastName, dbo_MasterData.OrderNumber FROM

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Show all the code for the query, not just part.

  5. #5
    Zerdan is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    May 2011
    Posts
    15
    Figured it out. Just needed to move the distinct to the very beginning for some reason.

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

Similar Threads

  1. Form limiting records
    By yaro.kobzar in forum Programming
    Replies: 1
    Last Post: 05-21-2011, 06:50 AM
  2. limiting number?
    By vespid in forum Database Design
    Replies: 1
    Last Post: 01-10-2011, 10:34 PM
  3. Limiting fields to certain lengths......
    By softspoken in forum Access
    Replies: 5
    Last Post: 04-20-2010, 12:32 PM
  4. Limiting access to certain users only
    By huskies in forum Security
    Replies: 1
    Last Post: 04-01-2009, 08:18 AM
  5. Limiting access to a Form
    By huskies in forum Forms
    Replies: 0
    Last Post: 12-02-2008, 09:21 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