G
Guest
Sir/Ma'am,
I currently have a query built to search for a text string in any part
of the field. The problem that I am running into was that when I use Like "*"
& [What is the name of the person you are looking for?] & "*", I get
everything, even when it has nothing to do with the value the user entered.
Like if the user entered "Doe", They would get John Smith. I've read through
the forum and it appears that should work, but mine is pulling up all the
records. I will post the code for everyone to view, and see where I might be
going wrong.
SELECT TblBlotter.*, TblExtras.* INTO TblSearch
FROM TblBlotter LEFT JOIN TblExtras ON TblBlotter.BlotterID =
TblExtras.BlotterID
WHERE (((TblBlotter.DeskSergeant) Like "*" & [Who is the Desk Sergeant that
you are searching for?] & "*"));
I currently have a query built to search for a text string in any part
of the field. The problem that I am running into was that when I use Like "*"
& [What is the name of the person you are looking for?] & "*", I get
everything, even when it has nothing to do with the value the user entered.
Like if the user entered "Doe", They would get John Smith. I've read through
the forum and it appears that should work, but mine is pulling up all the
records. I will post the code for everyone to view, and see where I might be
going wrong.
SELECT TblBlotter.*, TblExtras.* INTO TblSearch
FROM TblBlotter LEFT JOIN TblExtras ON TblBlotter.BlotterID =
TblExtras.BlotterID
WHERE (((TblBlotter.DeskSergeant) Like "*" & [Who is the Desk Sergeant that
you are searching for?] & "*"));