>set century on > >lcfullpath = fullpath(curdir()) >lcfullpath = left(lcfullpath, len(lcfullpath) - 1) >lclastfolder = justfname(lcfullpath) > >abc=alltrim("E:\SoftBkup\"+lclastfolder+alltrim("\")+alltrim("Xls")+alltrim("\")) >ab4=alltrim(abc)+alltrim(dtos(date())) > >mdbcname=(sys(5)+alltrim(sys(2003)))+'\TABLES\ACWS.dbc' >#define crlf chr(13)+chr(10) > >close all >close data >open database (mdbcname) excl >= adbobjects(latablearray, "TABLE") && Put table names into an array >for i=1 to alen(latablearray) && loop through each table in the array > mtablename=latablearray(i) && pick up table name from array > > x=0 > on error x=error() > use (mtablename) in 0 && attempt to open table > on error > > if x=0 && Possible table corruption > copy to type xl5 > endif >next x >>
adbobjects(latablearray, "TABLE") && Put table names into an array for i=1 to alen(latablearray) && loop through each table in the array x=0 on error x=error() use (latablearray(m.i)) in 0 && pick up table name from array and attempt to open table on error if m.x=0 && Possible table corruption copy to (addbs(m.ab4)+latablearray(m.i)+'.XLS') type xl5 endif endforPS: I assume you know the problems with type xl5.