un procedimiento o funcion muy simple llamado desde la macro autoexec sub checksharedopen () on error goto checksharedopen_err dim db as database, strdb as string, hfile as integer set db = dbengine(0)(0) strdb = db.name hfile = freefile open strdb for input access read shared as #hfile close #hfile checksharedopen_exit: exit sub checksharedopen_err: select case err case 70 persmission denied (share violation) msgbox you are not allowed to open this database exclusively , 16 application.quit a_exit case else msgbox error, 16, error # & err & in checksharedopen() end select resume checksharedopen_exit end sub |