assert alias()=="DOKSUMMA" Mess "Select has lost it's alias - Debug Time!"directly after the line if IRINA can work on version(2)=2.
function FixCursorAlias(tcAlias) *-- expects to be called on the workarea in question *-- or add a second workarea parameter tcAlias = upper(alltrim(m.tcAlias)) if alias()==m.tcAlias = strToFile(Transform(select()) + m.tcAlias + "!=" + Alias() + "$$$" + dbf(), "AliasErr.txt") local lnOldArea, lnNewArea, lcDbf lcDbf = dbf() lnOldArea = select() * Since we had an error, be extra careful and * do everything here slowly with one line for each operation select 0 use (m.lcDBF) again alias (m.tcAlias) Do While !alias()==m.tcAlias DoEvents && add other stuff here, perhaps more protocol use (m.lcDBF) again alias (m.tcAlias) enddo lnNewArea = select() select (m.lnOldArea) use select (m.lnNewArea) endifHTH