Solved

Field Assignment - too complex to be evaluated

Posted on 2013-01-15
2
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

710 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