Chris Miller
asked on
Access 2007 Criteria
I have a field in a query that has a long criteria, is there a way to shorten it?
Current Criteria:
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.
Current Criteria:
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, thanks!
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.