A SELECT...CASE...ENDSELECT would be more efficient. Once a match is found, the other conditions are not checked. Place the largest group at the top and add them in descending order by members.

Edited by Howard Bullock (2007-05-04 09:40 PM)
_________________________
Home page: http://www.kixhelp.com/hb/