Results 1 to 2 of 2
  1. #1
    hptel83 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    1

    Max of Consecutive Count

    I have table like the following with 1 and null value by year. need to count the consecutive max count per Id, in access query. I am not good in VBA therefore trying to solve with access query .
    ID 2001 2002 2004 2005 2006 2007
    101 1 1 1 1
    102 1 1 1 1 1
    103 1
    104 1 1 1 1 1
    105 1 1 1 1 1 1
    106 1 1 1


  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,935
    your data is not normalised, so you'll need a long calculation.

    nz([2001],0)+nz([2002],0)+......

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

Similar Threads

  1. Consecutive Numbering
    By kaylee in forum Access
    Replies: 10
    Last Post: 04-13-2016, 01:24 PM
  2. Consecutive without recursion.
    By emihir0 in forum Queries
    Replies: 7
    Last Post: 10-28-2015, 06:22 PM
  3. Count Consecutive Only
    By WickidWe in forum Queries
    Replies: 13
    Last Post: 12-16-2013, 02:33 AM
  4. Replies: 2
    Last Post: 07-29-2012, 05:52 PM
  5. Consecutive ID numbers
    By jdvd in forum Database Design
    Replies: 2
    Last Post: 12-11-2011, 06:48 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