is there a finite number of functions that can be used in an expression?
Expr 1 = Start Date Of Warranty
Expr 5 = End Date Of Warranty
What I started with (11 hard coded dates)
Expr2: IIf([Expr5]<#1/1/2002#,0,IIf([Expr1]>Now(),0,IIf([Expr1]<#1/1/2002# And [Expr5] Between Now() And #12/31/2002#,Now()-#1/1/2002#,IIf([Expr1]<#1/1/2002# And [Expr5]>#12/31/2002#,Now()-#1/1/2002#,IIf([Expr1]<#1/1/2002# And [Expr5]<Now(),[Expr5]-#1/1/2002#,IIf([Expr1]>#1/1/2002# And [Expr5]>#12/31/2002#,Now()-[Expr1]))))))
Works (8 functions)
Expr9: IIf([Expr5]<DateSerial(Year(Date()),"1","1"
,0,IIf([Expr1]>Now(),0,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5] Between Now() And DateSerial(Year(Date()),"12","31"
,Now()-DateSerial(Year(Date()),"1","1"
,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-#1/1/2002#,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]<Now(),[Expr5]-#1/1/2002#,IIf([Expr1]>#1/1/2002# And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-[Expr1]))))))
Does Not Work (9 functions)
Expr9: IIf([Expr5]<DateSerial(Year(Date()),"1","1"
,0,IIf([Expr1]>Now(),0,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5] Between Now() And DateSerial(Year(Date()),"12","31"
,Now()-DateSerial(Year(Date()),"1","1"
,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-#1/1/2002#,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]<Now(),[Expr5]-DateSerial(Year(Date()),"1","1"
,IIf([Expr1]>#1/1/2002# And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-[Expr1]))))))
Works (8 functions) Switching Places
Expr9: IIf([Expr5]<#1/1/2002#,0,IIf([Expr1]>Now(),0,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5] Between Now() And DateSerial(Year(Date()),"12","31"
,Now()-DateSerial(Year(Date()),"1","1"
,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-#1/1/2002#,IIf([Expr1]<DateSerial(Year(Date()),"1","1"
And [Expr5]<Now(),[Expr5]-DateSerial(Year(Date()),"1","1"
,IIf([Expr1]>#1/1/2002# And [Expr5]>DateSerial(Year(Date()),"12","31"
,Now()-[Expr1]))))))
Expr 1 = Start Date Of Warranty
Expr 5 = End Date Of Warranty
What I started with (11 hard coded dates)
Expr2: IIf([Expr5]<#1/1/2002#,0,IIf([Expr1]>Now(),0,IIf([Expr1]<#1/1/2002# And [Expr5] Between Now() And #12/31/2002#,Now()-#1/1/2002#,IIf([Expr1]<#1/1/2002# And [Expr5]>#12/31/2002#,Now()-#1/1/2002#,IIf([Expr1]<#1/1/2002# And [Expr5]<Now(),[Expr5]-#1/1/2002#,IIf([Expr1]>#1/1/2002# And [Expr5]>#12/31/2002#,Now()-[Expr1]))))))
Works (8 functions)
Expr9: IIf([Expr5]<DateSerial(Year(Date()),"1","1"
Does Not Work (9 functions)
Expr9: IIf([Expr5]<DateSerial(Year(Date()),"1","1"
,IIf([Expr1]>#1/1/2002# And [Expr5]>DateSerial(Year(Date()),"12","31"
Works (8 functions) Switching Places
Expr9: IIf([Expr5]<#1/1/2002#,0,IIf([Expr1]>Now(),0,IIf([Expr1]<DateSerial(Year(Date()),"1","1"