Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

develop search engine for database?

Status
Not open for further replies.

eagleclaw

Programmer
Sep 20, 2002
19
US
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.
 
It's a big task.

To find a site on the internet:
- go to a search engine
- look up something like Access Database Search Tables

DYI: In broad strokes
- You can iterate all the tables in the database using the tabledefs collection.

- You can iterate all the fields in a tabledef using the fields collection.

- You can generate SQL strings based on the user's query and the above table(s)/field(s)

- You can then execute the queries.

- For more flexibility, you could write VB code to do the seaching.

- consider fuzzy matching.

- consider spell checking the search criteria.
 
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.

Bob Scriver
 
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.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top