Results 1 to 7 of 7
  1. #1
    Brinleigh217 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    4

    Query Expression to return only the latest data

    I am needing to put in an expression into my query to pull the data for the latest date.


    To explain further:
    I have a table that has a username, password, and date of password (meaning when the password became active). I want a query to pull only the most recent password for each user, no duplicate usernames.

    Can anyone help me? I have not been able to figure it out.

    Thanks,

    Leigh

  2. #2
    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

  3. #3
    Brinleigh217 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    4
    I'm using 2010, where do I put in this code? I'm use to just building a query using the table layout at the bottom of the screen. I'm new to building databases. Can you explain this solution usage to me?

  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
    That is SQL, which you can put into SQL view of a query. It can also be done in design view, using the Totals icon.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Brinleigh217 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    4
    Ok, thanks. Now my next question. I have Three Fields:

    Password
    Password Start Date
    Login

    From following the instructions. I subbed [Password Start Date] for DorDate and Login for CarNum. But how do I get to also pull the password associated with the most recent entry for each login?

  6. #6
    Brinleigh217 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    4
    Oops Nevermind, I see it now. I was in the QryMaxDates. Thanks this was a big big help!!!!

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

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

Similar Threads

  1. Replies: 1
    Last Post: 12-15-2011, 04:26 AM
  2. Replies: 6
    Last Post: 06-26-2011, 12:15 AM
  3. Replies: 1
    Last Post: 05-17-2010, 12:21 PM
  4. Query doesn't return all data
    By hawzmolly in forum Queries
    Replies: 6
    Last Post: 03-26-2010, 09:12 AM
  5. Replies: 0
    Last Post: 11-12-2008, 05:18 PM

Tags for this Thread

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