Using Len in an IIf statement

D

Donna

I have the following in a query
GCRS: IIf(Len([combined]>3),Right([combined],3),"")
What I'm trying to get is that if the field [combined] has more than 3
characters in it, I want GCRS to display the last 3 characters of the
[combined] field.

What I get is #Error all the way down. What's wrong with my IIf statement?
 
V

Van T. Dinh

Wrong place for the closing parenthesis. Try:

GCRS: IIf(Len([combined])>3,Right([combined],3),"")

HTH
Van T. Dinh
MVP (Access)



Donna said:
I have the following in a query
GCRS: IIf(Len([combined]>3),Right([combined],3),"")
What I'm trying to get is that if the field [combined] has more than 3
characters in it, I want GCRS to display the last 3 characters of the
[combined] field.

What I get is #Error all the way down. What's wrong with my IIf
statement?
 

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