Solved

Access Expression Builder - Like & Not Like

Posted on 2011-09-19
3
697 Views
Last Modified: 2012-06-21
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!
0
Comment
Question by:Shanan212
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 36560638
try


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

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 500 total points
ID: 36560645
or this




[FieldName] Like (getstring([Forms]![Input]![txt1]) & "*") AND [FieldName] not like (getstring([Forms]![Input]![txt2]) & "*"
0
 
LVL 13

Author Closing Comment

by:Shanan212
ID: 36560728
You just saved me a whole lot of time by switching to Expers Exchange!

Cheers!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question