Solved

Field Assignment - too complex to be evaluated

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 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