There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Expression You Enter is Too Complex - Help PLEASE


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Amature User's Avatar
Junior Member with 3 posts.
 
Join Date: Jul 2008
Experience: Beginner
09-Jul-2008, 08:23 PM #1
Expression You Enter is Too Complex - Help PLEASE
Hi,

Below is my "iif" expression in access

=IIf([likelihood]="rare" And [Loss Given Occurrence]="Insignificant","2 & 3",iif([likelihood]="rare" and [Loss Given Occurrence]= "minor","2 & 3", iif([likelihood]="rare" and [Loss Given Occurrence]= "moderate","4 & 5", iif([likelihood]="rare" and [Loss Given Occurrence]= "major","4 & 5", iif([likelihood]="rare" and [Loss Given Occurrence]= "Catastrophic","6 & 7", iif([likelihood]="unlikely" and [Loss Given Occurrence]= "insignificant","2 & 3", iif([likelihood]="unlikely" and [Loss Given Occurrence]= "minor","4 & 5", iif([likelihood]="unlikely" and [Loss Given Occurrence]= "moderate","4 & 5", iif([likelihood]="unlikely" and [Loss Given Occurrence]= "major","6 & 7", iif([likelihood]="unlikely" and [Loss Given Occurrence]= "catastrophic","6 & 7", iif([likelihood]="Possible" and [Loss Given Occurrence]= "insignificant","4 & 5", iif([likelihood]="Possible" and [Loss Given Occurrence]= "minor","4 & 5", iif([likelihood]="Possible" and [Loss Given Occurrence]= "moderate","6 & 7", iif([likelihood]="Possible" and [Loss Given Occurrence]= "major","6 & 7", iif([likelihood]="Possible" and [Loss Given Occurrence]= "catastrophic","8 & 10","" )))))))))))))))

Can someone please help me how I can do this in a Form? I have a text box to bring the results back but when I copy this "iif" string into the form, it come back as your expression is too complex.

PLEASE help. QUITE DESPERATE..I am a new user too.
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
10-Jul-2008, 01:36 AM #2
Hi! Welcome to TSG Forum!
try this one!
Code:
=IIf([likelihood]="rare",
   Iif([Loss Given Occurrence]="Insignificant" or [Loss Given Occurrence]= "minor","2 & 3", 
   iif([Loss Given Occurrence]= "moderate" or [Loss Given Occurrence]= "major","4 & 5", 
   iif([Loss Given Occurrence]= "Catastrophic","6 & 7",""))),
iif([likelihood]="unlikely", 
   iif([Loss Given Occurrence]= "insignificant","2 & 3", 
   iif([Loss Given Occurrence]= "minor" or [Loss Given Occurrence]= "moderate","4 & 5", 
   iif([Loss Given Occurrence]= "major" or [Loss Given Occurrence]= "catastrophic","6 & 7",""))),
iif([likelihood]="Possible",
   iif([Loss Given Occurrence]= "insignificant" or [Loss Given Occurrence]= "minor","4 & 5", 
   iif([Loss Given Occurrence]= "moderate" or [Loss Given Occurrence]= "major","6 & 7",
   iif([Loss Given Occurrence]= "catastrophic","8 & 10","" ))))))
Just remove line brakes !
Amature User's Avatar
Junior Member with 3 posts.
 
Join Date: Jul 2008
Experience: Beginner
10-Jul-2008, 08:33 PM #3
Not Saving in Table
THanks for the syntax, it worked perfectly. The only problem I have now is it's not showing the results in my table.

Eg. in likelihood when I choose "Rare" and Loss Given Occurrence "Insignificant", the result come back as 2 & 3, which is great. But when I check my table, the 2 & 3 is not there. Why is that? it's not storing in the table. As I will need to do reporting, I need this to be save in the table.

Please help.
Amature User's Avatar
Junior Member with 3 posts.
 
Join Date: Jul 2008
Experience: Beginner
10-Jul-2008, 09:38 PM #4
Another Question
Thanks for the code. It worked perfectly.

What i've done is placed the code in the Control Source of my text box in form. The problem I now face is when the Risk Grading come back, it does not save in my table. I know that it does not save in my table because I've changed the control source....but is there away that I can have this save into my table??

How can I have the result save in my table?

I hope this make sense.....
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:57 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.