C
Chuck
I use an existing database that allows multiple selections of names from a
list box. The field in the record is a text field and is built using the
selection of names.
The field will have information such as:
Jones, Smith, Hilliary, Howard
I use a query that searches for a name an presents a list of records that
have that name in the field. So, if I search for "Jones", I get the record
with that name. The query is using the INSTR in it to find the name.
Unfortunately, after some testing, I find that if the search is for "Jon",
it pulls up all the records with "Jon" and "Jones" in it because of the
INSTR command.
Is there a way to search for the exact text instead of partial? Would the
LIKE command work better?
I was thinking of changing the way the text is stored and having the last
name have an ending comma as well, this way the search can be for "Jones,"
and it wouldn't find "Jon," then.
Any help would be greatly appreciated. Thanks.
list box. The field in the record is a text field and is built using the
selection of names.
The field will have information such as:
Jones, Smith, Hilliary, Howard
I use a query that searches for a name an presents a list of records that
have that name in the field. So, if I search for "Jones", I get the record
with that name. The query is using the INSTR in it to find the name.
Unfortunately, after some testing, I find that if the search is for "Jon",
it pulls up all the records with "Jon" and "Jones" in it because of the
INSTR command.
Is there a way to search for the exact text instead of partial? Would the
LIKE command work better?
I was thinking of changing the way the text is stored and having the last
name have an ending comma as well, this way the search can be for "Jones,"
and it wouldn't find "Jon," then.
Any help would be greatly appreciated. Thanks.