Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I have a search button setup in VB, but need to have user be able to select Enter after typing in the criteria to search by

Posted on 2012-03-19
6
Medium Priority
?
182 Views
Last Modified: 2012-03-19
Hello everyone,

I have setup a Search textbox in VB and I have a search button which does a search in finding records, but what if the user is lazy and does not want to select the Search button everytime and just selects the enter key.  Is there any coding that needs to be setup for the user to just select the Enter Key instead?  They want to do this also if the they so desire?

jjc9809
0
Comment
Question by:jjc9809
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 37738374
No code is needed.

Select the Form, then set the AcceptButton() property to your Button:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton.aspx

    "Gets or sets the button on the form that is clicked when the user presses the ENTER key."
0
 

Author Comment

by:jjc9809
ID: 37738543
Idle_mind,

I right click on the button, but see no AcceptButton property listed.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 37738557
Re-read....  =)

"Select the FORM, then set the AcceptButton() property to your Button"

AcceptButton() is a Property of the Form, not the Button.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jjc9809
ID: 37738616
Idle Mind,

The form that I have is an Aspx web form not a windows form.

Do you have the setting of the property the same with a web form?
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 37738639
Ah...that makes a huge difference.  Be sure to state in your future questions if you're working in WinForms or WebForms.  =\

I'm not a web programmer so I'm not sure how to do that.
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 37738962
You could have deleted this question or requested attention to get more people in on it.  I didn't really answer your question...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question