HELP with iif and combo box URGENT

Fastone

Registered User.
Local time
Tomorrow, 00:26
Joined
Nov 21, 2002
Messages
56
HELP with iif URGENT

The first problem has to do with an iif function I am trying to figure out. I have asked this question before but the answer didn't work out for me.

iif(format([Individual Policy Holders].[Date of first policy],”mm/yy”)=format(Date(), “mm/yy”),

iif([Broker Company/Branch].[Company Number]=Any other Company Number,

iff([Broker and Marketer Information].[Function]=Broker,0,15,0,05),0,20),

iff([Broker and Marketer Information].[Function]=Broker,0,20,0,03))

This is my quite elaborate iif function.

iif([Broker Company/Branch].[Company Number]=Any other Company Number,

Would I be able to change this part (it will come into a module) to something like a Lookup function (like in excell). I have just tried to put in lookup but I get an error and don't really now how to get around having to define specific fields.

Look here for some more information:
http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=38398


Thanks

P.S.: If you would like to see a copy of the DB go to
www.geocities.com/stijn_vermeulen/
Here you will find Two copies (2000 and 97) of the DB.

Edit: for those of you who read this topic before, I solved the problem with the combo boxes.
 
Last edited:
I didn't get thru all the code but there is two things that I am wondering about:
--Two of your «iif» are typed «iff»
--You ended with «0,20,0,03». Shouldn't it be «0.20,0.03»?
Maybe it is just errors you made while copying to your thread, but I thaught I had to point it to you just in case.
Newman
 
You are correct, those are typos.
The reason why I use 0,20 instead of 0.20 is of the Flemish settings on the computer, but either will do.
 
I'm not 100% sure about that one, but...
It is just that Access might take 0,20,0,03 as 0 for the first parameter and 20 as the second one. Then it will not know what to do with the 0 and the 03 left.
Newman
 

Users who are viewing this thread

Back
Top Bottom