Results 1 to 4 of 4

Public function for lag and lead?

  1. #1
    sergi117 is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    Sep 2018

    Public function for lag and lead?

    SQL server has this amazing set of functions (lag and lead). Unfortunately it is not available in Microsoft access, but I was wondering if anyone knows or has written a vba public function equivalent for lag and lead. The potential of lag and/or lead are so amazing that it actually surprised me that Microsoft access doesn't have it. Thank you for your time!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Nevada, USA
    I've seen it done with a subquery:
    Paul (wino moderator)
    MS Access MVP

  3. #3
    Minty is offline Hacker
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    UK - Wiltshire
    Well (probably because i'm stuck on SQL server 2008!) I didn't know about those functions. Neat.
    Still learn something new every day.
    DLookup Syntax and others
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Richmond (Virginia, not North Yorkshire!)
    Quote Originally Posted by Minty View Post

    Still learn something new every day.
    That's what makes Access so much fun...and why I'm still playing with it, 12 years after they put me out to pasture!

    Linq ;0)>
    The problem with making anything 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. public function values from form
    By ShostyFan in forum Programming
    Replies: 4
    Last Post: 10-02-2017, 01:11 PM
  2. Public Function
    By ShostyFan in forum Programming
    Replies: 3
    Last Post: 09-30-2017, 08:58 AM
  3. VBA Can't find Public Function
    By GraeagleBill in forum Programming
    Replies: 15
    Last Post: 03-17-2016, 08:38 PM
  4. Pass DAO.Recordset into public function
    By Ruegen in forum Programming
    Replies: 1
    Last Post: 07-06-2014, 11:31 PM
  5. Turning Private Function Into Public
    By g4tv4life in forum Programming
    Replies: 1
    Last Post: 02-04-2014, 04:31 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
Tech Forums: Microsoft Office Forums