PDA

View Full Version : Solved: Search function that only looks through one field in a table



Eric58132
09-22-2009, 06:35 AM
Hi All,

I'm having trouble figuring out if it is possible to limit the access search function to only one field in a table.

I am working on a database that with one main table, and several form which have record sets using this table (bound). The people using it would like to be able to search through records, but there is one rather large problem: The table of records they want to search through has over 130 fields (I know, wasn't my idea, the DB itself was built before I began trying to improve it) When searching for a record, the only applicable field used is [Address], though the preconstructed Access search feature looks through the whole table...which takes a long time with 130 fields X 50,000 records. Can I build a function that searches through only the Address field in the bound table? Thank you for your help.

CreganTur
09-22-2009, 07:08 AM
Instead of using the search function, you need to take direct control by creating a query where the user's input is used as criteria for the address field.

One way to accomplish this is detailed in this thread (http://www.vbaexpress.com/forum/showthread.php?t=27529)- start with post #5.

HTH:thumb

Eric58132
09-22-2009, 07:33 AM
thank you Cregan, I'll have a look at it