My record has topic1, topic2, ...topic5. I need to retrieve any records
where any of the five = my input parameter. How can I best go about this?
Van is, of course, absolutely correct. You're "committing spreadsheet
upon a database", and this table design will get you nothing but
trouble! If you have a many (items) to many (topics) relationship, the
proper structure is THREE tables:
1. Your current table (with no Topics information at all)
2. A table of Topics, with one row per valid topic
3. A table linking the two, with two fields: a field linked to the
Primary Key of Table1, and a Topic field.
With this design, you can add five (or two, or seventeen) records to
the third table specifying topics applicable to a given main table
record.
That said... you can use OR logic in a query. Create a query in the
query grid containing the fields you want to see; put
[Enter topic:]
on the Criteria lines under each of topic1 ... topic5, on *separate
lines* of the query grid. This will use OR logic so that if any one
(or two or more) of the Topic fields match, you'll get the record
retrieved.
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps