Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Search function on a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Please Help - 02 Jul 2007 22:16 GMT
Hello all,

I have a database that stores the information on books.  One of the forms in
the database is used to search for a book.  One of the fields on that form is
a contents field.  What I like to do is to have the form brings up a list of
records that meets the keyword keyed by the user.  For example,

Book 1 Contents: Drama, action, etc.
Book 2 Contents: Comedy and action
Book 3 Contents: Drama comedy

So when the form is open and prompt for the contents criteria and if I type
in "drama" or "drama*", the form would bring up the records of Book 1 and
Book 2.

Please help.  Can it be done?
scubadiver - 03 Jul 2007 08:46 GMT
Do your descriptive words appear in one field, several fields, or does each
word appear in a  separate record?

I would go for the last then you can simply filter the record and list all
the relevant books.

> Hello all,
>
[quoted text clipped - 12 lines]
>
> Please help.  Can it be done?
Please Help - 04 Jul 2007 04:46 GMT
Thanks for your response.  If I understand you question correctly, I have a
field called "contents".  The field contains the content information of a
book, and there are thousands of books in the database.  What I am hoping to
do is to have a search feature on a form of the contents field, like keyword
search.  For example, when the users type in (search for) a keyword of
"action", the form will show all the records (books) on the form.

Thanks.

> Do your descriptive words appear in one field, several fields, or does each
> word appear in a  separate record?
[quoted text clipped - 18 lines]
> >
> > Please help.  Can it be done?
scubadiver - 04 Jul 2007 07:42 GMT
You haven't said whether you have designed this database yourself or it has
been passed on to you. If the information hasn't been entered systematically
or using some consistent method then I think you might find it quite
difficult. I am not an expert on this kind of search function (sorry!).

The only thing I seem to recall from other posts is that you can use the
asterisk to look for keywords in a text field using the Like function (so you
aren't far off). Search for "text search" in the query forum and you will get
a few ideas.

It would be better (IMO) to have a 1-to-many relationship then each book can
have many genres and they can be held as records. The field would be a combo
box that lists all the various words you might want to use (and you can use
the not-in-list event to add words to the table). In a query list it would
look something like this

book      keyword
1           Drama
1           Action
2           Comedy
2           Action
3           Drama
3           Comedy

When you put a filter in the query for each keyword:

"drama" - books 1 and 3
"action" - books 1 and 2
"comedy" - books 2 and 3

Though the downside is to make sure that the keyword isn't repeated for one
book.

> Thanks for your response.  If I understand you question correctly, I have a
> field called "contents".  The field contains the content information of a
[quoted text clipped - 27 lines]
> > >
> > > Please help.  Can it be done?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.