Query filtering criteria by code help (1 Viewer)

KevinSlater

Registered User.
Local time
Today, 03:34
Joined
Aug 5, 2005
Messages
249
Hi,

I have a query that filters records by the a commodity code field to see if it contains certain letters in the left most letter of the code as shown below.

COM_CHECK: Left([COMMODITY_CODE],1)
criteria: "B" Or "L" Or "O" Or "C" Or "J"

However i now need to modify the query to also show records where the commodity code is exactly = to "PDIS", i have tired adding in another criteria to the query as show below but this does not work (no records display when the quey is run)
COMCHECK2: ([COMMODITY_CODE])
criteria: "PDIS"

Any advise on how to fix this would be great
see attched screenshot.

Kevin
 

Attachments

  • Query_Lookup.JPG
    Query_Lookup.JPG
    66.5 KB · Views: 93

khawar

AWF VIP
Local time
Today, 06:34
Joined
Oct 28, 2006
Messages
870
Write "PDIS" in the second line in the criteria grid
 

KevinSlater

Registered User.
Local time
Today, 03:34
Joined
Aug 5, 2005
Messages
249
Do you mean under the or criteria of COM_CHECK?: if so ive tried and this does not work.
the query runs and filters the records however It just seems to ignore the or criteria.
 

KevinSlater

Registered User.
Local time
Today, 03:34
Joined
Aug 5, 2005
Messages
249
Ok i guess you meant in the or criteria of COMCHECK2? that seems to have worked fine.

Thanks for your help
Kevin
 

DCrake

Remembered
Local time
Today, 03:34
Joined
Jun 8, 2005
Messages
8,632
As a pointer for the future or to anyone else reading this. When entering conditions in the query builder on the first row Access implies an AND condition as stated to check for alternative options use the subequnt row to invoke an Or statement.
 

Users who are viewing this thread

Top Bottom