Access coding

Inertia

Expert Member
Joined
Jan 23, 2005
Messages
3,297
Reaction score
2,582
Location
USA
Does anyone feel like telling me why I keep getting the "expression has a function containing the wrong number of arguments" error in Access for this piece of code:

Code:
Months_in_scheme_2010: 
IIf([Date_of_Withdrawal] Is Not Null,
  IIf(DateDiff("d",#2010/01/01#,[Date_of_Withdrawal])>=0,
    IIf(DateDiff("d",#2010/01/01#,[Date_of_Entry])<0,
      IIf(DateDiff("d",#2010/12/31#,[Date_of_Withdrawal])>=0, 12,
      DateDiff("d",#2010/01/01#,[Date_of_Withdrawal])/30),
    IIf(DateDiff("d",#2010/12/31#,[Date_of_Withdrawal])>=0, DateDiff("d",[Date_of_Entry],#2010/12/31#)/30,
    DateDiff("d",[Date_of_Entry],[Date_of_Withdrawal])/30),
  0),
IIf(DateDiff("d",#2010/01/01#,[Date_of_Entry])>=0, DateDiff("d",[Date_of_Entry],#2010/12/31#)/30,
0))

I really wish Access had a step-by-step debugging feature. Or does it??
 
Last edited:
Ahh, missed a bracket after some heavy searching. Nothing to see here
 
Top
Sign up to the MyBroadband newsletter
X