View Full Version : Building a search function in access


KCBroncoFan
12-17-2009, 01:57 PM
It has been a while since I have done much in Access or VB and sadly I seem to have forgotten most of it. I took classes in Access and VB around 5 years ago but wasnt using it until recently.

In theory I thought it would be easy to build something in my database to allow me to search for records by name. I am not finding it so easy due to my time away, I suppose lol.

I am trying to build a search function that will capture user input for what they are searching for then display that record and all things related.

I would appreciate any help in at least getting some basic functionality for this.

Thank you,

Scott

boblarson
12-17-2009, 02:14 PM
Please do not post the same question more than once. I've removed your duplicate post. If you think it went into the wrong category, click on the Report Post icon (Red Triangle with exclamation mark inside) and let the admins/mods know and then your post can be moved.

wilpeter
12-17-2009, 02:16 PM
The active ingredient can be a Select Query, run from a macro built into a command button, if you like. The field name may be long or short and complex or simple, so you may need to play with the search criteria. A known name, for example, "Johnson" (if the field is say LastName) can be prompted for by a Parameter. e.g., [Enter Name to search for]
If more complicated or if spelling is unsure Criteria can contain wildcards. e.g., Like *[Enter Name to search for]* (which will find the typed text within the field values.)