473,500 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execute Command Button click event when pressing ENTER in a text box

5 New Member
Access 2000
Windows XP

I have a small form with two text boxes:
- User ID
- Password

The form also has two command buttons:
- Login
- Cancel

I would like to set things up so the user can type in his/her ID, click Tab and enter his/her password, then simply press ENTER to login. Right now, when I press ENTER the form sets the focus on the Login button, but I have to press ENTER a second time to execute the click event for that button.

Can this be done?
Mar 25 '08 #1
1 8733
missinglinq
3,532 Recognized Expert Specialist
Sure! In Design View for the form, select the Login Button the goto Properties Sheet - Other and set the Default Property to Yes. Any time the <Enter> key is pressed, no matter where the focus is, the Login Button will fire.

Linq ;0)>
Mar 25 '08 #2

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

Similar topics

2
9574
by: ivanhoe | last post by:
All articles and tutorials I've seen on subject of forms say that if there's name and value for submit button(input tag with type="submit"), they'll get submitted along with the rest of the...
3
5118
by: Jason Kyle Baginski | last post by:
Here's a little test app to demonstrate a problem I'm having. It creates four buttons, each one with the different FlatStyle types available. Three of them behave exactly the same way(and the...
3
4196
by: Philip Townsend | last post by:
I have an aspx page that contains 2 user controls, each containing a seperate textbox and button. I would like to specify that one of the buttons recieve focus when the page loads. Also, I would...
12
7328
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...
1
1593
by: Eduardo78 | last post by:
I am working on a web application, my first one, I used to program windows app. and the form had an property where i could set a key to be de default to execute a botton click event. But now I...
17
9615
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
1
4630
by: Joey | last post by:
I have an asp.net 1.1/C# web form with a text box server control and one button server control. Users can type in text to search and then click the button to start the search. I want them to be...
1
6961
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
0
7020
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7241
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6913
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5502
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4928
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3114
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3112
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.