• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 787
  • Last Modified:

Access Expression Builder - Like & Not Like

Hi there,

I have the following scenario going in expression builder.

I want to sort a column for certain strings (say type 'A') but not for 'B'

The current formula I have is not working

Like (getstring([Forms]![Input]![txt1]) & "*") not like (getstring([Forms]![Input]![txt2]) & "*"

Open in new window

Any help is much appreciated!
  • 2
2 Solutions
Rey Obrero (Capricorn1)Commented:

Like (getstring([Forms]![Input]![txt1]) & "*") AND not like (getstring([Forms]![Input]![txt2]) & "*"
Rey Obrero (Capricorn1)Commented:
or this

[FieldName] Like (getstring([Forms]![Input]![txt1]) & "*") AND [FieldName] not like (getstring([Forms]![Input]![txt2]) & "*"
Shanan212Author Commented:
You just saved me a whole lot of time by switching to Expers Exchange!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now