IIF statement with Like operator

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.
 
M

Michel Walsh

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


Top