That would depend:
The example you gave suggested that the only null values would be at either tilt 0 or tilt 3
If this is the case (the null value cannot be at say tilt 2?), then the program can be extended to larger tilt values easily by just changing
Code:
If rs.Fields("tilt") = 3 Then
to say
Code:
If rs.Fields("tilt") = 10 Then
HOWEVER, if the tilt values were from 0 to 10 and the value 1,2,3,4,5,6,7,8,9 could be a null value then I'm gonna need more info. (which value would the sumsystem take?)