I have this statement (below) that works if the condition is true but if its false its not returning what I would like for it to.
![]()
Please Login or Register to view this content.
Not sure what I missed.
I have this statement (below) that works if the condition is true but if its false its not returning what I would like for it to.
![]()
Please Login or Register to view this content.
Not sure what I missed.
Last edited by jgomez; 07-19-2013 at 05:20 PM.
You've exceeded the allowable limit for nested IIF statements (7).
Would you like to say thanks? Please click the: "Add Reputation" button, on the grey bar below the post.
Try using a Switch statement within an Iif statement.
Formula:
Please Login or Register to view this content.
If posting code please use code tags, see here.
Learn something everday... thank you both. I'm not familiar w/the switch function so i keep getting errors. I will keep trying.
What you could do is set up a small table with 2 fields STE CODE and Years.
The STE CODE field would be populated by the various values "21", "42" etc and the Years field with the corresponding no of years to add.
Then you could use DLookUp to retrieve the no of years to use in the DateAdd.
I've got a feeling that might not be good practice but it should work.
It would also be handy if the years ever changed - you could just change them in the table without having to change the expression.
That will work! Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks