After tinkering and spending several hours analyzing and tweaking the codes, it finally worked. Thanks a lot for your help.

Francis