no meaning to enter deptno with no displaying name pls consider.i did not post this thread because of this specific situation , i posted it just to know the logic the task is handled , the way to do this .
the problem is it is an additional work , and he can search for a non existent department , then he is enforced to write it again after searching because he could not find it .I don't understand how this can be more work as there is less coding with the method I've suggested.
it should look like this
Your example looks almost exactly like the test case I created except mine had the department description displayed as well. With the DEPT as the Master block - the user simply has to press F11 to put the Form in Query-Mode. Then type in the DEPTNO and press Ctrl+F11 to execute the query. The Form will automatically display all employees in the selected DEPTNO. The user then just clicks in the EMP block - presses Ctrl+DownArrow to create a new row and then type in the related employee information and press Ctrl+S to save.