Hi Ecniv,

It is solved now, as you suggested I changed the line and it is working fine now.

Also I use DB.Close and rst.Close before setting them to Nothing.

Thanks a lot.

Regards,
Alankar