It is Solved !!!!!!!!!! It works fine with: rsThesi.Count - 1 DO WHILE rsThesi.Index < rsThesi.Count - 1 change_bgcolor(CInt(rsThesi!thesi)) rsThesi.MoveNext() LOOP Thank you Dimitri and Doriano