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
173 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
  • 4
  • 2
6 Comments
 
LVL 85

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 85

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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 85

Accepted Solution

by:
Mike Tomlinson earned 500 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 85

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now