Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2002
    Location
    Ventura, California, USA
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Query Issue (Access 2002)

    Hey Gang,

    I have a database that I need to write a report for. I have all the reports done but 1. I need a query that will allow me to get the information based on the following criteria.

    I need to know what patients has had one procedure done but not another. They exists in the same field. How do I write a query that would allow me to find out who has had a shot but not a pill??

    Thanks,

    IrishDan

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Query Issue (Access 2002)

    Dan,
    So we'll skip the lecture on why we don't keep two criteria in one field <img src=/S/grin.gif border=0 alt=grin width=15 height=15>...how is the information set up? What are the exact verbages for the options? A list of some example choices would be great...a stripped down copy of the database (just some example data) would be preferred <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Access Query Issue (Access 2002)

    I attach a demo showing how you would do it with one table structure.

    My demo needs three queries to do this.

    First query find the list of shot patients, second find a list of pill patients.

    The third joins these together, but uses a left join, so all shot patients are returned, then tests for Null on the pill patients side of the join.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •