How can I set focus back or remained on Textbox?
Hi all,
I use the following Events associated with Textbox 1. BeforeDropOrPaste (for OLE drag and drop) 2. Keydown (for capturing key stroke) by Taborder, the next control that gets focused is Commandbutton. Simply put, I want focus to remain in the Textbox control when user presses Enter key. At the moment, I can clear the entry in the Textbox but no matter how I code it focus shifts to the Commandbutton... Thanks in advance. Tetsuya Oguma |
How can I set focus back or remained on Textbox?
Hi Tetsuya,
Change these Textbox properties EnterKeyBehavior True MultiLine True Now hitting Enter will create a new line, not sure if that's what you want. Regards, Peter T "Tetsuya Oguma" wrote in message ... Hi all, I use the following Events associated with Textbox 1. BeforeDropOrPaste (for OLE drag and drop) 2. Keydown (for capturing key stroke) by Taborder, the next control that gets focused is Commandbutton. Simply put, I want focus to remain in the Textbox control when user presses Enter key. At the moment, I can clear the entry in the Textbox but no matter how I code it focus shifts to the Commandbutton... Thanks in advance. Tetsuya Oguma |
How can I set focus back or remained on Textbox?
maybe as part of your coding simply add in
textbox1.set focus so even if the focus wanders to the command button, it's instantly redirected back to the textbox. just an idea. :) susan "Tetsuya Oguma" wrote in message ... Hi all, I use the following Events associated with Textbox 1. BeforeDropOrPaste (for OLE drag and drop) 2. Keydown (for capturing key stroke) by Taborder, the next control that gets focused is Commandbutton. Simply put, I want focus to remain in the Textbox control when user presses Enter key. At the moment, I can clear the entry in the Textbox but no matter how I code it focus shifts to the Commandbutton... Thanks in advance. Tetsuya Oguma- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 12:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com