473,666 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to program the Keywords Searching Function?

50 New Member
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 3240
nico5038
3,080 Recognized Expert Specialist
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 Recognized Expert Specialist
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, "Applicatio ns!"

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 New Member
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 Recognized Expert Specialist
Sounds like a much more sensible approach! Glad we could help!

Linq ;0)>
May 8 '08 #5
Ben33h
1 New Member
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
3015
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 on www.python.org, compiled with default options (./configure && make). I'm using the pyPgSQL plugin to connect to a PostGreSQL database, and have tried the Debian and self-compiled newest versions of that as well. I'm running BitTorrent, and...
3
1765
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 until 'explicit' is entered. If the user fails to enter a valid keyword, the program terminates. #include <iostream> #include "KeyWord.h"
92
9848
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 someone helps me... Urgent - Please reply soon ! Thanks, Raghu
9
3377
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 information I want, based on keywords mentioned in the needed paper. Since I don't feel like inventing hot water, I thought I'd ask you people a few questions. I was planning on making tables with a many-to-many relationship for papers and...
20
8352
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 be put somewhere not in the body of the index.html page and I think something called "meta data" is needed but don't know if this is right. Any help very much appreciated.
6
2119
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, 302) I can infer the usage here but previously I had thought that "in" was only used with '"for". I looked thru 'the Python Reference Manual and found "in" is a keyword but in skimming thru I found it only with "for". The reference manual seems...
13
1636
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 generated can grow a lot. Perhaps I should allocate a large max size in advance? TIA, -RFH
11
6477
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 youtube.com, then it would search youtube.com, get the names of the videos, the links, and the embed information? Or something like that.
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.