out boolean OUT_Active; {default form to 'UPR_Employee_MNT_Pay_Type';} {default window to 'UPR_Employee_MNT_Pay_Type';} OUT_Active = false; { Get Current User's Class } 'User ID' of table SY_Users_MSTR = 'User ID' of globals; get table SY_Users_MSTR; if err() = OKAY then if not empty('User Class' of table SY_Users_MSTR) then { Get Record from table, if it exists } 'Employee ID' of table UPR_MSTR = 'Employee ID' of window UPR_Employee_MNT_Pay_Type of form UPR_Employee_MNT_Pay_Type; get table UPR_MSTR; if err() = OKAY then { Validate User Defined Field } if 'User Defined 2' of table UPR_MSTR <> 'User Class' of table SY_Users_MSTR then run script delayed 'Clear Button' of window 'UPR_Employee_MNT_Pay_Type' of form 'UPR_Employee_MNT_Pay_Type'; focus 'Employee ID' of window UPR_Employee_MNT_Pay_Type of form UPR_Employee_MNT_Pay_Type; warning "Access to Employee ID "+'Employee ID' of table UPR_MSTR+" is only available to Users of Class: " + 'User Defined 2' of table UPR_MSTR; OUT_Active = true; end if; end if; end if; end if;