fFilter query based on one specific character in field

jk12

Always getting problems.
Local time
Today, 20:28
Joined
Feb 16, 2006
Messages
91
Hi all,

Having spent much of yesterday afternoon searching the forums (probably with the wrong questions) I'm stilll wondering if it is possible to do the following.

Within our work's database there is a field for a project number (input mask 00>L000C;0;*) which I need to filter down according to specific offices. Each office has an individually assigned letter (N, A, H) which appears as the 3 character in the input mask and it is on this letter I want to filter the records on. My problem is some records will contain the letter A but not as the office identifier (at the end as the wildcard entry to signify a revision/additional works to the same project) so i can't do a like criteria for the query as it will return all records with A in regardless of the office they're for.

Below is some example record entries so you can hopefully see better what I mean.

10N001, 10N002, 10N003, 10A001, 10A002, 10H001, 10H001A, 10H002

I would want to be able to filter the query according to the third character only. i.e. if I say filter by A I only want to have return records 10A001 and 10A002 not them two and 10H001A as this record isn't applicable to office A as it's an office H project.

I've probably not made myself clear at all so any questions please ask.
 
Your criteria needs to be:
Code:
WHERE Mid([mytext],3,1)="A"

hth
Chris
 
Re: Filter query based on one specific character in field

Fantastic. Works a treat. I had a feeling it would probably be something simple and I just wasn't seeing it.

Thanks for the response
 
The second suggestions also works in case anybody else wonders. A double thanks must go out seeing as I now have two solutions.
 

Users who are viewing this thread

Back
Top Bottom