Add the following check after "USE SALE EXCLUSIVE" if used("SALE") * file could be exclusively used, meaning that * no one else is in the system else wait window "System in use!" ... endif <\pre> > DELE ALL FOR SALDATE >= A > PACK > ENDIF > ...... > ...... > >For this sample I have trouble that error "Database access deny" I thinks it is so because at the begining of my program I use "set excl on" > Thanks for your time. <pre> You need to trap the "file access denied" error using: on error do errhand with error() procedure errhand parameter m.errno do case case m.errno=1705 * someone is using the file * do nothing, let used() to deal with it otherwise wait window "Unexpected error!" quit endcase return