Access Building a IIF expression in Access

Feb 5, 2016
Reaction score
I have a expression in my data base that adds 7 days to a date if a field contains specific information. The expression works great. On another field I'm trying to build a similar expression and can not get it to work.

This is the expression that works for adding 7 day to a date


No I want the expression to be able to say that if the BatchLot field and the ConcreteAge field are null then do nothing. If the BatchLot field contains something and the ConcreteAge field has a value I want to add the value of the ConcreteAge field to the SampleDate. In other words if the ConcreteAge field says 3 then I want to add 3 days to the date if it says 10 then I want to add 10 days. I have written the following expression but seem to be missing something.

IIF(IsNull([BatchLot]) and (IsNull([Concrete Age Day]),"",DateAdd("d",+([ConcreteAgeDay]),[SampleDate]))

Can anyone help?????


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question