Hi, I need to build an MS Access database and include abstracts and articles. I then need to retrieve this information using Visual Basic. I would like to design it so that when someone types in a word in a search facility then relevant info would appear just like in Google ie. not just the keyword but a few lines. Please can you help Thanks Richard

Ive done it in access itself, not with VB.

In access I made a query and made the SQL starement so it said SELECT (whatever fields) from (tablename) WHERE (search field) LIKE (searchterm)

searchterm was supplied by the user and the output of the query was displayed in a report

in my case, i was searching a libary database for books by title

Hi, that is great thanks. Could you possibly tell me what was the searchterm used to give me some idea how I should phrase my search term thanks Richard

Okay, so in my database I had a table saying:

BookID (Key)
BookName
BookPrice
BookSampleChapter

In MS Access the query was:

SELECT books.BookID, books.BookName, books.BookPrice, books.SampleChapter
FROM books
WHERE (((books.BookName)=[Enter Book Name]));

In MS Access [Enter Book Name] presents the user with a dialog biox asking that question.

I then used the result of the query to make a report showing the books and thier details, which were similar to the search term

Im sure you could do the same thing in VB6 quute easialy.

To succeed the most import thing is how you design your database and of course you have to use LIKE search.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.