procedure SetDataEnvironment if !file(oApp.SysDataBaseLong) then && return false if file doesn't exist return .f. endif if !dbused("'" + (oApp.SysDataBaseLong) + "'") open database (oApp.SysDataBaseLong) shared set database to (oApp.SysDataBaseShort) set date british set exclusive off set multilocks on set exact on return .t. endif endprocI call this in the load of every form just before I open views etc - if the call fails I want to cancel the load of the form and ask the user if they want to try again but I can't seem to cancel out of the load - it seems to run it's course regardless! Any ideas?