Not Like criteria problem

jrhessey

Registered User.
Local time
Yesterday, 19:54
Joined
Nov 3, 2004
Messages
29
I've done some searching here, can't find too much info because the I can't search for just "not like". I'm trying to make a query that excludes all part numbers that end in -P2. I trimmed my table field because there where blank spaces behind the part numbers. I called the field this

Code:
BillNumber: Trim(BMI_ProductionHistoryFile!BillNumber)

Here is the criteria I am using.

Code:
Not Like '%-P2'

That returns everything in the table. That should return 47 records.

I tried the code

Code:
Like '%-P2'

and it returned 0 records. That should return 8 records.


What am I doing wrong??
 
Would it help to change to :
'%-P2*'
 
Add a calculated field that extracts the last three characters and use Not "-P2" as the criterion.
 
Actually I just tried this code

Code:
'*-P2'

and it worked. I thought the wildcard for access was %.

I don't know? It's working though. Thanks for your help.
 
The wildcard for Access is the *. It's the % in SQL Server.
 

Users who are viewing this thread

Back
Top Bottom