Thanks Arvil.. Yes I understand very much what is going wrong. Now kindly anyone can give a simple solution, without making much changes as the database is in use with so much datas. Is it possible to use Dlookup or tempvar or... functions to solve this problem. Please suggest and the syntax.