Re: Query of three fields simultaneously



Thanks for your answer, Arvin.

But the problem is that a book can be more than one type. The example I gave
is not so happy but I tried to ilustrate the situation. Imagine for example
that you want to associate to a certain book the keywords «War», «Drama» and
«Terror». That is why I have three combo boxes in order to allow the user to
choose more than one keyword for each book. Do you understand what I mean?
(my English is not so good)

Thank you in advance for your help.

Best regards.

Acores

"Arvin Meyer [MVP]" escreveu:

Since a book cannot be more than one type, you only need 1 combo to search
that type. Storing multiple values in a single field (regardless of whether
or not it is possible to do so) is poor database design and a violation of
database normalization rules.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"acores" <acores@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8CD78A01-FCA7-4D5D-B947-DED78B7734A4@xxxxxxxxxxxxxxxx
Hello. Can anyone help with this problem, please?

I am building a library database and I created the table «tbl_keywords».
This table has only one field named «Keywords» and I inserted some records
on
this table such as «Fictional», «Romance» and «Technical», for example.

I inserted three combo boxes in the book form «frm_book» to allow the user
to choose the keywords associated to each book. The user can choose up to
three keywords of the table «tbl_keywords» for each book (one on each
combo
box). Each keyword chosen is saved on the books record, as «kw1», «kw2»
and
«kw3».

Everything is working fine, until this: I want to create a query that
allows
the user to see all the books of one certain type, I mean, keyword.
Imagine
that you need to see all the «Romance» books, for example. The problem is
that the query must search the keyword «Romance» in the three fields
«kw1»,
«kw2» and «kw3» of the table «tbl_books», because the user could have
chosen
«Romance» in one of the three combo boxes.

I hope I made myself clear, but ask me if you have any question, please.

Thanks in advance.

Best regards,

Acores



.



Relevant Pages

  • Re: Query of three fields simultaneously
    ... storing each keyword as a separate row in a third table to resolve the ... Take a look in the Northwind database that comes with Access. ... choose more than one keyword for each book. ... Best regards. ...
    (microsoft.public.access.forms)
  • Re: My First C# (warning - long post)
    ... if it contains the keyword. ... from hitting the database to determine if the name is a database name. ... KeywordDictionary interface. ... push the knowledge of the Connection to the data source class ...
    (comp.lang.cobol)
  • Re: Method/Program for small "database" with some pictures entries
    ... In fact from the simple database I ... two-level tree structure it might pay to investigate relational database ... Variable attributes in a relational database are a bit tricky and depending ... > set of indexed files into two (contains keyword/doesn't contain keyword). ...
    (comp.os.linux.misc)
  • RE: Search function on a form
    ... You haven't said whether you have designed this database yourself or it has ... Search for "text search" in the query forum and you will get ... box that lists all the various words you might want to use (and you can use ... When you put a filter in the query for each keyword: ...
    (microsoft.public.access.forms)
  • Re: Using COUNT and ORDER BY in a SQL Statement
    ... > database and returns the record count using the COUNT keyword. ... > I have a database called users with 1 table named tblStaffInfo. ... > with username as the primary key. ...
    (microsoft.public.inetserver.asp.db)