IIF statement with Like operator

  • Thread starter Thread starter Vanessa_S
  • Start date Start date
V

Vanessa_S

I have put the following IIF statment in a select query;
sortgroup: IIf([Status]='Like A*',"A_GRP"). I have a
colum Status that can have the values 'AA', 'RA' or 'AR'
Where it found the character A the field sortgroup should
have the 'A-GRP' assigned. It does not work, can anyone
see what I'm doing wrong??? Many thanks! Vanessa.
 
Hi,


iif( status LIKE "A*", "A_GRP" )


The operator is LIKE, not =. You do not want something equals "like x",
textually, but something like "x", no?



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Iif Statment 7
Conditional IIF Statement 6
IIF Statement not working as expected 3
IIF Statement Problem 7
iif statement within query 2
Mutiple IIF Statements 4
IIF statement in a Query ? 5
IIf statement Query 17

Back
Top