P
Peter Knight
Hello,
I have a form called "Guest Search" where the user is asked to enter a
guest name, which can appear in three different fields in a table. It
is also possible that there are multiple entries for the guests in the
field e.g Peter, James, John. What I need to do is to have the user
enter their search in the guest search form and for the query to find
all the entries which are a close match whether they are slightly
mis-spelt or appear further down the field e.g James.
I currently have the following SQL query, which I have put together
from a query which is working, but only on exact matches and then
adding suggestions from other posts. However the query doesn't work as
it just displays all the results:
SELECT SearchTable02.Guest, SearchTable02.[Artist Name],
SearchTable02.[Pre-Mix DJ], SearchTable02.[Audio Details], *
FROM SearchTable02
WHERE (((SearchTable02.Guest) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Artist Name]) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Pre-Mix DJ]) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Audio Details]) Like [Forms]![Guest Search] & '*'));
Any help with this would be great.
I have a form called "Guest Search" where the user is asked to enter a
guest name, which can appear in three different fields in a table. It
is also possible that there are multiple entries for the guests in the
field e.g Peter, James, John. What I need to do is to have the user
enter their search in the guest search form and for the query to find
all the entries which are a close match whether they are slightly
mis-spelt or appear further down the field e.g James.
I currently have the following SQL query, which I have put together
from a query which is working, but only on exact matches and then
adding suggestions from other posts. However the query doesn't work as
it just displays all the results:
SELECT SearchTable02.Guest, SearchTable02.[Artist Name],
SearchTable02.[Pre-Mix DJ], SearchTable02.[Audio Details], *
FROM SearchTable02
WHERE (((SearchTable02.Guest) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Artist Name]) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Pre-Mix DJ]) Like [Forms]![Guest Search] & '*')) OR
(((SearchTable02.[Audio Details]) Like [Forms]![Guest Search] & '*'));
Any help with this would be great.