| |
You are here: Experts > Computing/Technology > Business Software > 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
|
|