Results 1 to 4 of 4
  1. #1
    nejenkins is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2015
    Posts
    14

    Query design

    I have a database of patient who received different operations. I would like to have a list of patients who have received operation ‘x’ with also, just for those patients’ a list of all the other operations they have had.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    SELECT * FROM table WHERE PatientID IN (SELECT PatientID FROM table WHERE Operation = "x");
    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
    nejenkins is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2015
    Posts
    14
    do i type this in the criteria box of the field in the design view of the query?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Do you mean the IN operator and nested SQL, yes it goes in criteria.

    Can try typing in SQL view and then switch to Design view.
    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. Query design
    By Ranger7913 in forum Queries
    Replies: 1
    Last Post: 10-21-2014, 11:30 AM
  2. Replies: 1
    Last Post: 05-02-2014, 09:29 AM
  3. Query\db design help
    By BRZ-Ryan in forum Queries
    Replies: 13
    Last Post: 01-06-2014, 08:56 PM
  4. Query design
    By joanne2468 in forum Queries
    Replies: 3
    Last Post: 07-30-2013, 09:29 PM
  5. Query Design
    By Daryl2106 in forum Access
    Replies: 7
    Last Post: 12-05-2012, 09:55 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