Problem with search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a query to search a Book Category field in a Books table. The database is not normalized so the different book categories aren't stored in a lookup table and there is inconsistency among the entries in the Book Category field.

I want the query to prompt the user for a category and then find all the records that have a Book Category similar to what the user entered. For example, if the user enters "sci" the query should find all records that have a Book Category of "science", "science fiction", "sci-fi", "sci-fi/fantasy", etc.

I know how to prompt the user for information but I don't know how to set up the search.

Any help would be appreciated.
 
I am trying to create a query to search a Book Category field in a
Books table. The database is not normalized so the different book
categories aren't stored in a lookup table and there is
inconsistency among the entries in the Book Category field.

I want the query to prompt the user for a category and then find
all the records that have a Book Category similar to what the user
entered. For example, if the user enters "sci" the query should
find all records that have a Book Category of "science", "science
fiction", "sci-fi", "sci-fi/fantasy", etc.

I know how to prompt the user for information but I don't know how
to set up the search.

Any help would be appreciated.

As criteria for the Book Category column, using the word science to
search for....
1) To search for categories that begin with the entered word:
Like "*" & [Enter category]
Science fiction

2) If you wish to search for the word anywhere in the field, then:
Like "*" & [Enter category] & "*"
conscienceness

3) If you wish to search for just records that end with the word:
Like [Enter category] & "*"
Pseudo-science
 
Fred, I think you reversed the criterion strings for 1 and 3 in your
examples.....


--

Ken Snell
<MS ACCESS MVP>

fredg said:
I am trying to create a query to search a Book Category field in a
Books table. The database is not normalized so the different book
categories aren't stored in a lookup table and there is
inconsistency among the entries in the Book Category field.

I want the query to prompt the user for a category and then find
all the records that have a Book Category similar to what the user
entered. For example, if the user enters "sci" the query should
find all records that have a Book Category of "science", "science
fiction", "sci-fi", "sci-fi/fantasy", etc.

I know how to prompt the user for information but I don't know how
to set up the search.

Any help would be appreciated.

As criteria for the Book Category column, using the word science to
search for....
1) To search for categories that begin with the entered word:
Like "*" & [Enter category]
Science fiction

2) If you wish to search for the word anywhere in the field, then:
Like "*" & [Enter category] & "*"
conscienceness

3) If you wish to search for just records that end with the word:
Like [Enter category] & "*"
Pseudo-science
 
Back
Top