Results 1 to 5 of 5
  1. #1
    LOUIX is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    24

    Red face Last record row in a query


    Hi All,
    I'm quite new in access, I have a table with several fields.
    My table have a unique ID, a Branch ID( may contains duplicate values), Mileage, Authority No, and a Date field
    I want to extract only the last value inserted per Branch ID for all the fields as per the attachment.
    I don't have any clue have to do it, can you please help
    if you need more info , don't hesitate
    File attached
    Thanking you
    Louix
    Attached Files Attached Files

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    try this
    Code:
    SELECT tblGoodwillSub.ID, tblGoodwillSub.BranchID, tblGoodwillSub.strLabWarranty, tblGoodwillSub.strPartWarranty, tblGoodwillSub.strLabLeal, tblGoodwillSub.strPartLeal, tblGoodwillSub.strLabCustomer, tblGoodwillSub.strPartCustomer, tblGoodwillSub.txtVin7, tblGoodwillSub.txtMileage, tblGoodwillSub.txtAuthority, tblGoodwillSub.dtValid, tblGoodwillSub.Count
    FROM tblGoodwillSub
    WHERE (((tblGoodwillSub.ID)=DMax("ID","tblGoodwillSub","BranchID = " & [branchid])));

  3. #3
    LOUIX is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    24
    Moke123
    Ohh my god
    You are a genius, you saved my life
    Thanking you very much

  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,652
    Welcome to the site. FYI, I deleted your duplicate thread. In the future, there's no need to post the same question twice.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    LOUIX is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2018
    Posts
    24
    pbaldy
    Well noted
    sorry for inconvenience
    Thanks
    Louix

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

Similar Threads

  1. Replies: 3
    Last Post: 10-04-2015, 10:17 AM
  2. Replies: 6
    Last Post: 08-06-2015, 09:44 AM
  3. Replies: 8
    Last Post: 07-08-2015, 07:06 PM
  4. Replies: 32
    Last Post: 05-23-2013, 04:16 PM
  5. Replies: 5
    Last Post: 06-29-2010, 01:24 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