Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
Access 2007 Criteria
I have a field in a query that has a long criteria, is there a way to shorten it?
Like "13-*T" Or Like "13-*A" Or Like "13-*M" Or Like "13-*B" Or Like "13*F" Or Like "14-*T" Or Like "14-*A" Or Like "14-*M" Or Like "14-*B" Or Like "14*F"
The numbers are the year.
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Rather than use the LIKE or IN operators, which are notoriously slow, I would do something similar to:
WHERE (Left([FieldName],2) = "13" OR Left([FieldName],2) = "14")
AND (Right([FieldName], 1) = "T" OR Right([FieldName], 1) = "A" OR Right([FieldName], 1) = "M" OR Right([FieldName], 1) = "B" OR Right([FieldName], 1) = "F")
Depending on the size of your recordset, this would probably be much more efficient.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent