Results 1 to 3 of 3
  1. #1
    newegyptian is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2019
    Posts
    46

    how to use dlast function in details


    How i can use dlast function in details

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    How do you want to use it? What do you want to accomplish?
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I suspect that this is one of those leftover functions that originally came from Visual Basic, which the VBA languages were based on....and doesn't do what common sense would dictates it does!

    What DLast() actually does is return a random record from a particular field in a table or query when you simply need any value from that Field from any Record...it does not return the value from that Field from the last Record!

    Per VBA Help:

    "If you want to return the first or last record in a set of records (a domain), you should create a query sorted as either ascending or descending and set the TopValues property to 1. From Visual Basic, you can also create an ADO Recordset object and use the MoveFirst or MoveLast method to return the first or last record in a set of records."

    Hope this helps!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. DLast not getting last record
    By Ron99 in forum Access
    Replies: 13
    Last Post: 06-21-2017, 05:25 AM
  2. Dlookup or Dlast
    By fspata in forum Forms
    Replies: 10
    Last Post: 10-19-2016, 10:12 AM
  3. DLast not working
    By abusaif in forum Access
    Replies: 4
    Last Post: 11-18-2014, 06:22 AM
  4. DLast
    By alyon in forum Access
    Replies: 4
    Last Post: 12-21-2012, 02:01 PM
  5. vba Dlast for each page!
    By Ivanho in forum Reports
    Replies: 0
    Last Post: 11-23-2011, 04:27 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