I am facing same problem after applying your solution.
What is the real time scenario:-IN Transfer Order Page I created a additional field for Barcode on Header part. Now I want to scan barocode to add lines in Transfer Line Subform (to add lines i created a function so that is not a problem). So, to keep scanning in barcode textbox i want my cursor should not move from barcode text box. When i enter on it, cursor moves in transfer line subform. which I do not want.
thanks and regards