Results 1 to 3 of 3
  1. #1
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150

    Show One record in Access Query


    Hi Everyone

    I have a query which includes EmpID,EmpName,DeptID,Deptname

    When i search the query by EMPID it should show only the department that he is working.

    But with my current query when i search the datasheet view shows multiple data's. (duplicates)

    how to limit it to show just one data.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Post query SQL statement.

    Post example of raw data.
    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
    SierraJuliet's Avatar
    SierraJuliet is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2017
    Location
    Earth
    Posts
    211
    Like June7 said you need to post samples but in the meantime.

    SELECT
    EmpID, EmpName, DeptID, Deptname
    FROM (SELECT DISTINCT EmpID FROM TableName)
    WHERE Condition = Criteria;

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

Similar Threads

  1. Replies: 11
    Last Post: 04-03-2017, 05:02 PM
  2. Show in query only last record from table
    By wnuczus in forum Forms
    Replies: 1
    Last Post: 03-24-2017, 10:01 AM
  3. Show only last record in a query
    By angie in forum Queries
    Replies: 3
    Last Post: 07-26-2016, 11:13 AM
  4. Limit query to only show the latest record
    By marcustofeles in forum Queries
    Replies: 12
    Last Post: 10-05-2011, 08:06 AM
  5. Show only last record in query
    By robsworld78 in forum Queries
    Replies: 18
    Last Post: 09-02-2011, 08:36 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