
Originally Posted by
RayMilhon
Yes you can but it's a lot more complicated. You simply create a module and place the VBA Code there How you create a module Depends on your version of Access. Thats the easiest then in your Form, Report you add a text box and in the control source you put in =IIF(isNull([datepaid]),pastdue(invoicedate),"")
To put it into a control on a form or report requires the following
=IIF(IsNull([datepaid]),IIF(datediff("d",[invoicedate],date())<30,"Current",IIF(datediff("d",[invoicedate],date()) between 31 and 60,"30 Days",IIF(datediff("d",[invoicedate],date()) between 61 and 90,"60 Days","90 Days"))),"")
plus you have to do it every time you want that to display.