I need to incorporate a search engine into my database, Users should be able to select any field from any table and search that field (or Fields). Can someone maybe let me know of a reference or site that will help me get started.
eagleclaw: That's a pretty big request. ACCESS does provide a search engine by form. If you create a form with a table or query of records as its recordsource, you can place the cursor in any field and Click a Search Button and the user may enter the required search value and select a number of parameters and ACCESS will then search down through thre records and show them one at a time for the user.
On a grander scale Queries can be written that use a prompting form for the fields to be searched. The end user can either enter data in search field or leave it blank. The query then runs and selects any number of records that meet the criteria entered by the user.
These all require some programming intervention to set them up but as far as a universal all tables , all fields, search engine I am not aware of one.
At a former employer I wrote a generic form that will search the recordsource of any form for any data on any field type using access97 and DAO. It included facilities to add a default field to search and ability to exclude certain fields from those that can be searched.
It took about a day and a half including testing and adding All I needed to do to add it to another form was to pass across the form's name as a parameter to the search field.
For something to get Eagleclaw started, I suggest looking at DAO code, loops to obtain details of tables, fields within tables, their data types, forms, controls on forms and reports etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.