473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Enter button question

I have a form that has three text boxes and a command button. For
textbox1, I can tab to the next field and enter into that field. If I
hit the enter button while I'm in the textbox1 field, it also tabs to
next field. However, I want the form to run the code in the Command
button instead when the enter button is pressed.

How can this be done?
TIA
Nov 12 '05 #1
2 1667
"ziggs" <zi***@hotmail.com> wrote in message
news:05********************************@4ax.com...
I have a form that has three text boxes and a command button. For
textbox1, I can tab to the next field and enter into that field. If I
hit the enter button while I'm in the textbox1 field, it also tabs to
next field. However, I want the form to run the code in the Command
button instead when the enter button is pressed.


Set the Default property of the command button to True.
Nov 12 '05 #2
You also set the focus to the command button, after the text box you want to
run the command code.
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alan Zhong | last post by:
i am trying to similate an "ENTER" as a key to switch focus in a sequence of text inputs. i don't want to use "event.keyCode" since i want to do additional testing before i decide which text input...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
2
by: ziggs | last post by:
I have a form that has three text boxes and a command button. For textbox1, I can tab to the next field and enter into that field. If I hit the enter button while I'm in the textbox1 field, it...
1
by: Dave | last post by:
I have a web page with a text box and a query box that submits a query to a database that fills a datagrid. I want the enter key to submit the query - sof far I haven't found a method to it. ...
2
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
5
by: Girish | last post by:
I have TWO submit buttons of type IMAGE on my asp form. This renders as <input type="image">. I need to be able to eble the ENTER button for both buttons. Yes, I know that for the input type...
12
by: SJ | last post by:
Hope someone can help me out there I'm struggling with a particular problem... I have a form with many tab pages. On one tab page I've got a button which when clicked with a mouse adds items...
4
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches....
6
by: Mark B | last post by:
I have a function that looks up a SQL table to see if a search term matches. It works fine but so far there are two things yet to work: 1) After entering a search term and pressing Enter, nothing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.