Results 1 to 6 of 6
  1. #1
    Nola_Gal is offline Novice
    Windows Vista Access 2003
    Join Date
    May 2010
    Posts
    3

    Selecting Most Current 'Revision'

    I am using MS Access 2003 Prof Edition
    My question has to do with a query...I have a table which includes patient episode data...fields include
    pt number
    episode number
    diagnosis


    revision number
    etc...
    I would like to pull selected patient information, but only from the most current revision. For most patients, this would be revision # 1. For others that have gone through several revisions, it might be revision number 3 or 4.
    How can I build this selection into my query. (Also, I am only comfortable using the visual design mode right now...)
    Thanks so much for any help or direction you can give!

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Hi Nola_Gal,

    Is the table attribute "revision number" formatted as Number or Text?

    Cheers,

  3. #3
    Nola_Gal is offline Novice
    Windows Vista Access 2003
    Join Date
    May 2010
    Posts
    3
    As a number.

    Thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Nola_Gal is offline Novice
    Windows Vista Access 2003
    Join Date
    May 2010
    Posts
    3
    No, sorry but it's a little over my head...BUT I did find out that there is a row status field which distinguishes between current and superceded entries so I was able to work off that!

    Thanks for trying! I need to take some lessons...

  6. #6
    AccessTheWayAhead is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    3
    Hi Nola_Gay

    You need to create a group by query then use that as a sub query joining it to the original table.

    1. create a new query and add your table
    2. drop only the pt number and the revision number
    3. make the query a group by
    4. change the revision number from group by to Max
    5. save and name as latest revision
    6. open your current query and add the sub query
    7. join the pt number in the table to the sub query
    8. join the the revision number in the table to the maxofrevision number in the sub query


    That should do it...

    David

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

Similar Threads

  1. Selecting Dates
    By jpalk in forum Queries
    Replies: 3
    Last Post: 05-21-2010, 06:08 AM
  2. Selecting between two dates
    By nicorvp in forum Queries
    Replies: 5
    Last Post: 05-04-2010, 08:17 AM
  3. Selecting next set of control No's
    By newtoAccess in forum Queries
    Replies: 0
    Last Post: 02-28-2010, 10:28 AM
  4. Selecting random with exclutions
    By owutne in forum Queries
    Replies: 1
    Last Post: 02-03-2010, 09:33 PM
  5. Selecting Just One Name Type
    By susan in forum Queries
    Replies: 1
    Last Post: 12-03-2009, 12:08 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