473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to program the Keywords Searching Function?

50
Hi, I am attempting to develop a library system in Ms Access 07 but I face problem with the search function of the system. The search function is just like a search engine, the user type in a word and the system will start looking for the documents which contain the correspondent keyword after the search button is clicked. I have a table name tblDOC which contains the following fields:

[Doc_ID], [Category], [Organisation], [Doc_Code], [File_Name], [Edition], [Doc_Title], [Year], [Author]

Note: [File_Name] is a hyperlink field

The documents are stored in different folders inside C:\Library, and also, the folder may have other subfolders inside to store the document. The documents are .pdf and .doc. file.

My Question is:
How should I write a program in VBA to search the keywords in these documents , and return the search results in the MS Access report? So that when user clicks on the [File_Name] field, the document will be opened.

Thank you and hope to hear from you guys very soon as I am stuck and do not know how to continue.
Apr 29 '08 #1
5 3227
nico5038
3,080 Expert 2GB
I'm afraid that a "dynamic" search will cost too much time to be of any value for a user.
I would index the documents first and store the words in an Access table on forehand with a link to the document row(s) it's used in.

On the other hand I would probably not even try this as when I need to do a file search I just use a specialized tool like a local google search engine or (for textfiles) the FileSearch of TextPad.

Perhaps investigating how to link your aplication with the google desktop search might be a way to go.

Nic;o)
May 7 '08 #2
missinglinq
3,532 Expert 2GB
How should I write a program in VBA to search the keywords in these documents , and return the search results in the MS Access report?
You don't "write programs in VBA." You develop applications in VBA, that's what the A stands for, "Applications!"

Access
is used to develop databases, not search engines, which, as Nic;0) has hinted at, is what you're trying to do here. Nor is Access intended to be used simply as a reporting tool ala Crystal Reports.

Access can link to a txt file or a pdf file, given the proper path, and open them for viewing, given the proper code, but this is not a simple or speedy process.

To think of typing in one or more keywords and having Access search thru multiple folders/subfolders with multiple documents in each, open each and every document and do a word by word search, and then retrieve the target document(s) for viewing, using another application, is not ill advised, but, to be blunt, simply ludicrous.

In programming, as in most professions, the secret to success is to use the right tool for the job at hand! Given a great deal of time and a great deal of experience in a language such as C/C++ or VB6 or VB.Net, you could , I suppose, develop such a program, but you should really give serious thought to the advice Nic;0) has given you.

Linq ;0)>
May 7 '08 #3
beemomo
50
Thanks for your replies, nico5038 and missinglinq.

Yes, you guys are so right. Anyhow, I have found a solution which is more direct and simple. Based on the user's requirements, they will only search the keywords from three layers of the documents instead of the whole document, which are - Title, Table of Content and Index.

From there, I will use the two "Memo" fields in my database table to store the keywords which plugged out from Table of Content and index from the pdf document instead of using "Text" field since "Memo" field can store up to 1 gigabyte of characters.

As a result, the searching function is using SQL condition LIKE with wildcard to retrieve the result.

This is the easiest way that I discovered. Thanks for the advices, I really appreciate it much. Cheers!
May 8 '08 #4
missinglinq
3,532 Expert 2GB
Sounds like a much more sensible approach! Glad we could help!

Linq ;0)>
May 8 '08 #5
Ben33h
1
Hi! i know i know.. like what the hell am i doing at an old forum right... well its actually just the right topic that i need help on.. a little bit different, and probably a lot easier!

I've created an access file/database for my mom, for the sake of organizing her recipes. But i want to create a search engine (or even more simpler, a search form)... a search that will only need to search within one database, one file.

Could anyone offer me some help?
thank you!!
Jul 18 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Juho Saarikko | last post by:
The program attached to this message makes the Python interpreter segfault randomly. I have tried both Python 2.2 which came with Debian Stable, and self-compiled Python 2.3.3 (newest I could find...
3
by: Jason Heyes | last post by:
This is a revised version of a post entitled "Class to support keywords". Please reply to this post instead of the old one. The following program repeatedly prompts the user for C++ keywords...
92
by: Raghavendra R A V, CSS India | last post by:
hie.. Do any one knows how to write a C program without using the conditional statements if, for, while, do, switch, goto and even condotional statements ? It would be a great help for me if...
9
by: Nenad Loncarevic | last post by:
I am a geologist, and over the years I've accumulated quite a number of proffesional papers on the subject, in various publications. I would like to make a database that would help me find the...
20
by: admyc | last post by:
How can I make google show a link to my website when words are entred into its search field that don't actually appear in the main page of/anywhere in my website. I think these keywords need to...
6
by: gtb | last post by:
Have done some searching but have not found a place where I can look up python keywords. I was looking at a script that contained the following line: assert self.getResponseCode() in (200, 304,...
13
by: Ramon F Herrera | last post by:
I am writing a program that generates source code. See a snippet below. My question is about the use of that growing 'code' variable. Is it efficient? Is is recommended for this case? The code...
11
by: KillSwitch | last post by:
Is it possible to make a program to search a site on the internet, then get certain information from the web pages that match and display them? Like, you would put in keywords to be searched for on...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.