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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter key behavior in a Text Box

Status
Not open for further replies.

jwalz

Programmer
Oct 31, 2000
78
0
0
US
I have a search form in Access and would like to be able to run the search routine when a user hits the Enter key after filling in their serach criteria. Is there an action event that I can call the search function from with a text box?

Thanks,
Janet
 
You could try putting your code in the onkeydown or onkeypress events. I believe you can trap for a specific key code and only execute then. Hope this helps, Ken

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
You could also tie an Event Procedure to the AfterUpdate property of the textbox. This way, any time the user changes or enters data into the textbox, then either presses Enter or tabs out of the textbox, the Event Procedure code will be executed.


[shadeshappy] Cruising the Information Superhighway
[sub] (your mileage may vary)[/sub]
 
How are ya jwalz . . . . .

I would add a Run Search [blue]Command Button[/blue] and run my code from their, espcially since its too easy for a user to hit enter (out of habit) and trigger premature results.

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top