Help with a query using wildcards

G

Guest

I have a table with 12 fields, 3 of which are named Keyword 1, Keyword 2 &
Keyword 3 with each field and each record containing a keyword in the
appropriate cell. Using the query design wizard I have created a “keywordâ€
search whereby the user types in the keyword they are looking for and access
will display the appropriate record(s). The keyword entered must be the
keyword entered into the table (capitalization does not matter).

I did this by entering the following “criteria†in the design view of the
query. The criteria is: [what word are you looking for?]. This criteria is
entered into each of the appropriate field locations.

What I would like to do and have been unsuccessful in doing is modifying
the criteria statement using wildcards where I could have the user’s only
type in the first 3 letters of the keyword they are looking for and it will
display all the keywords containing the first 3 letters. This would permit
users who are not familiar with the keywords that are in the table to more
quickly find what they are looking for. Example; the user wants to find the
records relating to discipleship, and they type in disciple, no records will
be found. I would like for them to be able to type in dis, then all records
containing dis as the 1st 3 letters would be shown i.e. discipline, disciple,
discipleship, etc.

Any help on creating or modifying this query using wildcards to permit
typing in only the 1st 3 letters of a word would be appreciated
 
G

Guest

The criteria to enter the leading characters use ---
Like [what word are you looking for?] & "*"
For criteria to be able to enter any part of the field use ---
Like "*" & [what word are you looking for?] & "*"
What if you need to have four keywords? Will you add another field? It is
best to use a single field to search for keywords and then you could have an
unlimited number. If you use the single filed then use the second criteria
above.


--
KARL DEWEY
Build a little - Test a little


Leon said:
I have a table with 12 fields, 3 of which are named Keyword 1, Keyword 2 &
Keyword 3 with each field and each record containing a keyword in the
appropriate cell. Using the query design wizard I have created a “keywordâ€
search whereby the user types in the keyword they are looking for and access
will display the appropriate record(s). The keyword entered must be the
keyword entered into the table (capitalization does not matter).

I did this by entering the following “criteria†in the design view of the
query. The criteria is: [what word are you looking for?]. This criteria is
entered into each of the appropriate field locations.

What I would like to do and have been unsuccessful in doing is modifying
the criteria statement using wildcards where I could have the user’s only
type in the first 3 letters of the keyword they are looking for and it will
display all the keywords containing the first 3 letters. This would permit
users who are not familiar with the keywords that are in the table to more
quickly find what they are looking for. Example; the user wants to find the
records relating to discipleship, and they type in disciple, no records will
be found. I would like for them to be able to type in dis, then all records
containing dis as the 1st 3 letters would be shown i.e. discipline, disciple,
discipleship, etc.

Any help on creating or modifying this query using wildcards to permit
typing in only the 1st 3 letters of a word would be appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top