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 : 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 so trying to get it done in 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	
