>IF (nKeycode=13 .OR. nKeyCode=9) > KEYBOARD '{DNARROW}' > NODEFAULT >ENDIF >This.llAllowExit = INLIST(nKeyCode,4,5,19,24) >>and then returning .F. from the Valid() when .llAllowExit=.F. The Kilofox example for moving to the next row seemed unneccessarily complicated and the above works fine in that respect. The main problem now is that when the max length of the textbox is reached the Valid() fires (and returns .F. as required) but the entire text in the box is then selected so that the next keypress deletes it all ! How can I prevent this ? I see the selection of text in the textbox is NOT controlled by it's own .SelectOnEntry property but that of the column in which it is contained - if the columns SelectOnEntry is .F. then the problem goes away but I want SelectOnEntry=.T. in normal circumstances.