>if lastkey()=13 >thisform.cmdSearch.click() >endif >>The click event of the button runs a procedure and returns focus to the textbox.
>thisform.findrec() >thisform.donstextbox1.SetFocus() >>This works properly when the button is clicked with the mouse but does not work when the click is called from the textbox. Instead of returning focus to the textbox, focus goes to the next control in the tab order.