create table security ( tablename, fieldname, readlevel, writelevel )
and populate this only with fields that need security.* CheckSecurity method: lparameter roObject for each loObject in roObject.Objects if ( pemstatus( loObject, "objects", 5 ) ) this.CheckSecurity( loObject ) && drill into this container else if ( pemstatus( loObject, 'controlsource', 5 ) and ! empty( loObject.ControlSource ) ) select readlevel, writelevel ; from security ; into cursor thisfield ; where tablename = juststem( loObject.ControlSource ) and fieldname = justext( loObject.ControlSource ) if ( _tally > 0 ) with loObject .Enabled = goUser.nSecurityLevel >= thisfield.ReadLevel .Visible = goUser.nSecurityLevel >= thisfield.WriteLevel endwith endif endif endif endforIt should run fairly fast, it only has to be done once as the form instantiates. You could forego the lookup of security levels by attaching properties to each of your controls and set them in the designer, but that requires changing a lot of classes.