Thanks to all of you. I think the next() trick is the one I'm looking for. -- ahlongxp Software College,Northeastern University,China ahlongxp at gmail.com http://www.herofit.cn