Solved

Field Assignment - too complex to be evaluated

Posted on 2013-01-15
2
381 Views
Last Modified: 2013-01-15
I'm having difficulty using the field assignment below as an if/then statement.  Is there another way to state it?
Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100",IIf(Left([Invoice]![Cost Center],2)=30,"102",IIf([Invoice]![Cost Center] Like "1N*","313",IIf(Left([Invoice]![Cost Center],3)>135 And Left([Invoice]![Cost Center],3)<137,"325","300"))))

The output returns: "This expression is typed incorrectly, or it is too complex to be evaluated.  For example, a numeric expression may contain too many complicated elements.  Try simplifying the expression by assigning parts of the expression to variables."
0
Comment
Question by:CFMI
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 38779724
first try to find where the error is coming from, use a simple IIf expression and continue building it.

Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100","MORE")

if you don't get an error on that one, expand it like this


Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100",IIf(Left([Invoice]![Cost Center],2)=30,"102","MORE"))
0
 
LVL 1

Author Comment

by:CFMI
ID: 38779833
I got it.  The answer is:

Entity: IIf([Invoice]![Cost Center] Between "135*" And "137*","325",IIf([Invoice]![Cost Center] Like "0*","100",IIf([Invoice]![Cost Center] Like "30*","102",IIf([Invoice]![Cost Center] Like "1N*","313","300"))))

Give me the points and please let's put this issue to rest.  Thanks for looking.  Sorry to bother anyone.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now