Thanks Sergey,
I'l give that a try. Is there any reason to avoid using iif() in the SQL? I just got in the habit of avoiding that for some reason.
Cris
>You can try to change it as follow
AND ( (Customer.cId LIKE ?vp_cCustomerId ) ;
OR Customer.cId IS NULL) ;
AND ( (LineItem.cwoItemId LIKE ?vp_cwoLineItemId ) ;
OR LineItem.cwoItemId IS NULL) ;