Sorry Mike,
My apologize, I understand now the statement ON ERROR lnDS = lnDS-1 prevent foxpro to display the error message, so even if an error occurs (which happen), no message is display and it will execute the remaining code.
Thanks, both you and Nadia for your ideas, I'll use them.
Diane Robitaille eng.