Size limit in Control Source String

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I need to put a complex string in a control in an Access
report. I think I'm running up against a string length
limitation (my string is 552 characters). Is there a way
to change that limit, or way to nest statements to
overcome this? Here is my code:

IIF([ProdUnitCost]*[ProdQty]<(IIf([ProdMRC]=0,
[ProdUnitCost]*[ProdQty],[ProdMRC]*[ProdQty])*12/360)*IIf
([ProdMRC]=0,360/12,DateDiff("d",[SLAPerfDateStart],
[SLAPerfDateEnd]))Or([ProdMRC]*[ProdQty]*12<(IIf([ProdMRC]
=0,[ProdUnitCost]*[ProdQty],[ProdMRC]*[ProdQty])*12/360)
*IIf([ProdMRC]=0,360/12,DateDiff("d",[SLAPerfDateStart],
[SLAPerfDateEnd])), IIf([ProdMRC]=0,[ProdUnitCost]*
[ProdQty],[ProdMRC]*[ProdQty]),(IIf([ProdMRC]=0,
[ProdUnitCost]*[ProdQty],[ProdMRC]*[ProdQty])*12/360)*IIf
([ProdMRC]=0,360/12,DateDiff("d",[SLAPerfDateStart],
[SLAPerfDateEnd])))

Thanks

kevin
 
There is no way that I would ever create an expression that complex in a
query or anywhere else. I would create a user defined function in a standard
module. Save with a module name like basStandardCalcs or something similar.
A code solution would be so much easier to maintain.
 
Back
Top