Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2003, 11:10 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Location: Taunton, Somerset, United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting a search txt box to work

Hiya,

I'm workin on a database with a order list. I want to let the user type in a order number via a text box then just press return to find the relevant order.

I can do it with a button next to the search text box but I want to start the search when the user presses enter. I've tried the Keypress events but they don't seem to work too well.

Anyone done this?
 
Old October 21st, 2003, 11:18 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try the OnEnter for the textbox

Sal
 
Old October 21st, 2003, 11:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

If you use the textboxe's AfterUpdate event pressing either the Enter key or the Tab key will execute your search.

Bob

 
Old October 22nd, 2003, 07:28 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Location: Taunton, Somerset, United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Guys. I'll try the after update event again.

Sally, The on Enter event will only work when starting to enter the Order number. I need to to extract the number when the user has finished with it. (I'll try it too though, just in case!)

Cheers
John
 
Old October 23rd, 2003, 10:19 AM
JJ JJ is offline
Registered User
 
Join Date: Jun 2003
Location: Taunton, Somerset, United Kingdom.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, The AfterUpdate event works a treat.

Don't know why I didn't get it working before!

Cheers
J




Similar Threads
Thread Thread Starter Forum Replies Last Post
exporting pdf search plugin results to .txt file solos Pro Visual Basic 2005 0 August 6th, 2007 12:01 PM
grep e$ words2.txt doesn't work plantseeker BOOK Beginning Linux Programming, 3rd Edition 1 December 12th, 2005 02:46 PM
Search for unknown charictors in a txt file broadbandguru VB How-To 3 September 16th, 2005 05:46 PM
DATE within txt box alannoble Excel VBA 1 December 22nd, 2004 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.