473,385 Members | 1,661 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,385 software developers and data experts.

can i use the Enter key instead of the tab key in entering data to textbox?

After entering data in the first text box I want to make the second text box to get focus when the Enter key is pressed instead of Mouse and Tab control.
Is there any way to do that by making the key values of the Tab key and the Enter key?
Sep 1 '09 #1
4 2910
tlhintoq
3,525 Expert 2GB
For textbox1 create a handler for the Keypress event.
In that event handler you can put in a switch/case construct to check if the keypress was tab or enter then set the focus to the next control.

Remember it is also preferable to set up the tab order in visual studio so tabbing works in the order the user would expect. From the 'View' menu select 'Tab order', then click on the controls in the order you want them to be tabbed through. Just follow the numbers.
Sep 1 '09 #2
Please give me an example.
ThankU in advance for u'r prompt responce.
Sep 2 '09 #3
could i get an example about using the Enter key instead of the tab key to get the focus from textbox1 to textbox2 , when the Enter key is pressed after the data is filled in to textbox1..
Sep 4 '09 #4
tlhintoq
3,525 Expert 2GB
For textbox1 create a handler for the Keypress event.
In that event handler you can put in a switch/case construct to check if the keypress was tab or enter then set the focus to the next control.
Did you make an effort do try my first suggestion? If you are having some trouble with the code you tried, please post it and we'll see what we can do to clean up your efforts.
Sep 4 '09 #5

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

Similar topics

6
by: Terry | last post by:
I have a form which is displayed in Datasheet View and would prefer it if, when entering data, I could use the keyboard as I would when entering data into a Datasheet. Is it possible when...
10
by: Deano | last post by:
I think that just about sums it up. Is there a fix/workaround for this?It's quite annoying behaviour and not user-friendly.thanksMartin
10
by: mg | last post by:
I want to enter characters in a TextBox in a WebForm, press a Button in the WebForm, and read the characters that were typed into the TextBox from within the Button_Click event handler. The main...
5
by: Eric | last post by:
Hi All, I'm very experienced in traditional ASP and am new to (am learning) ASP.NET. FYI: I am initially learning ASP.NET with VB.NET to ease the transition for me. I have encountered what I...
2
by: chuckdfoster | last post by:
I have a form that with a datagrid with textboxes and a submit button. When the user is in a textbox and they hit enter to try to go to a different line, instead they submit the form before they...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
5
phillipsbrian
by: phillipsbrian | last post by:
I have achieved a good amount of programme as my first VB programme. So far all the bugs are out but! I have been trying to work with a TEXTBOX and am really confused. my aim is to have the user...
24
by: MichaelK | last post by:
Who knows how to prevent submitting a form on the press Enter button before all fields on the form are filled up. People just enter the first field hit Enter and it submits the form and doing...
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.