Use BeforeProcess event of child page for this purpose. Check the number of records and redirect to the Add page if required. Selected master table foreign key is stored in $_SESSION[$strTableName."_masterkey1"] More info: http://www.xlinesoft.com/phprunner/docs/ph...n_variables.htm