Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sent to print typing enter 1

Status
Not open for further replies.

Trinitri

IS-IT--Management
Jun 10, 2003
12
CA
I have a form with some text box and a button, on click on the button the system open the report and close the form.
What I want is that when the user left the las text box typing enter the button action be activate. I tried to use the event on got focus but doesn't work because I can't close the form, so my problem is how I can use the event press the type enter.
Thanks for your help
 
You can use the "enter key behavour" to tell
access what to do if the enter key is pressed while
in a particular txt box
 
Hi,

use the OnKeyDownEvent of the TextBox.

There use the following code:
[tt]
If KeyCode = vbKeyReturn Then
'your code
End If
[/tt]
This should do.

Greeting,
Jens
 
Thank you so much, your help was very valuable.
grettings,
Trinitri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top