PARAMETERS logname IF VARTYPE(logname)!="C" .or. LEN(ALLTRIM(logname))<6 IF VARTYPE(USERNAME)!="C" .or. LEN(ALLTRIM(USERNAME))<6 logname=GETENV('USERNAME') ENDIF ENDIF IF LEN(ALLTRIM(logname))<6 store "UNKNOWN" TO logname ENDIF WAIT WINDOW "Loading Work Order Entry Program and Enabling Security... "+logname+" ..." NOWAIT * Setup resource file for user LOCAL lcresource, lcSelect lcSelect=SELECT() STORE "\work\techsvcs\resource\"+UPPER(ALLTRIM(logname))+".DBF" TO lcresource IF FILE (lcresource) SET RESOURCE TO &lcresource ELSE USE \work\techsvcs\resource\foxuser.dbf && generic resource file copy to (lcresource) with cdx && create one for the user USE && close it SET RESOURCE TO &lcresource && make this their resource ENDIF