Solved

Field Assignment - too complex to be evaluated

Posted on 2013-01-15
2
389 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
hit enter key to run macro 13 23
Allow user to edit an outgoing email 2 24
deduplicating based on criteria 2 21
trying to catch ODBC error when database opens 2 27
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 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