By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

TextBox Return Key problem in VB Express 2005

P: 1
Hi All!

Simply put, I have a "Search" textbox which is followed by a "GO!" button. What I can't seem to figure out is how to activate the "GO!" button control by pressing the Return (Enter) key once I've typed something in the textbox.

Any help with this is greatly appreciated.

Thanks!
Apr 25 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
Simply put, I have a "Search" textbox which is followed by a "GO!" button. What I can't seem to figure out is how to activate the "GO!" button control by pressing the Return (Enter) key once I've typed something in the textbox.
I believe that for this to work, you have to have the following conditions:
  • Textbox not be set to multi-line. If it is, pressing Enter just inserts a line break. In this case, you could try putting a shortcut key on the button (Eg Alt-G for "go").
  • The command button must be set as the default for the form to capture the Enter. In VB6, this was done by setting the Default property to True. Don't know about your version.
Apr 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.