AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Find Record Text Box Entry

Using MS Access - Find Record Text Box Entry


Expert: Scottgem - 11/6/2009

Question
I have access 2007 and I would like to creat text box entry on the switchboard that would allow someone to enter a document number, hit enter, and have the form open up to that specific record.  

Answer
Frankly I wouldn't do it that way, but you can by using the After Update event of the textbox. Use the Code Builder to add this line of code:

DoCmd.OpenForm "formname",,,"[DocNumber] = " & Me.DocNumber

Supply your own formname and name of the document number field and controlname.

But the way I would do it, is to use the combobox wizard and create a "search combo" (3rd option) in the header of the form. The advantage of doing it that way is the user can find the record, then still navigate among the records or go back and find another record without having to go back to the switchboard.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.