Stop access thinking I'm using a wildcard (1 Viewer)

MattioMatt

Registered User.
Local time
Today, 11:27
Joined
Apr 25, 2017
Messages
99
Hello,

I'm trying to make a query to look for value in my column called 'Category'. The text I want to look for is as follows, *Logical Application*.

The asterisks are within the text it needs to find. However every time I try to put "*Logical Application*" in the criteria access changes the criteria to Like "*Logical Application*" but I don't want that to happen. I just want to find *Logical Application*.

How can I do this?
 

jdraw

Super Moderator
Staff member
Local time
Today, 06:27
Joined
Jan 23, 2006
Messages
15,380
I mocked up a table as follows


with this query
Code:
SELECT Departments.*, Departments.Departmentname
FROM Departments
WHERE (((Departments.Departmentname)="*LogicalApplication*"));

And it seems to work


Ooops; I see plog has answered while I was testing a revision.
 

Attachments

  • TestDepartments.PNG
    TestDepartments.PNG
    16.6 KB · Views: 94
  • queryResult.PNG
    queryResult.PNG
    8.6 KB · Views: 101
Last edited:

plog

Banishment Pending
Local time
Today, 05:27
Joined
May 11, 2011
Messages
11,634
Applying logic to your *Logical Application* issue means that you have other values in Categories that contain "Logical Application"? Otherwise using 'Like "*Logical Application*"' should work fine.

If indeed you have other values in your Category field that do contain "Logical Application", the way to find the ones that are exactly "*Logical Application*" is to put an equals sign in the criteria:

="*Logical Application*"

Access is like every other Microsoft product--it tries to outhink you and ends up being a pain by auto correcting you incorrectly.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:27
Joined
Feb 19, 2013
Messages
16,601

Users who are viewing this thread

Top Bottom