totn Access

MS Access 2007: Set up a text box to display a date value when another field has a value

This MSAccess tutorial explains how to set up a text box to display a date value when another field has a value in Access 2007 (with screenshots and step-by-step instructions).

Question: In Microsoft Access 2007, I have a text box called Date_release_wjp that I'd like to evaluate to Dateadd("m",6,[Date_ completion]) but only if the [Amount_wjp] field has a value. If the [Amount_wjp] field is blank, I'd like to display a blank value in Date_release_wjp.

Answer: First, please remember that calculated values belong in formulas/queries, not as fields in your table.

To set up your text box as you described, you can use the following formula:

=IIf(IsNull([Amount_wjp]),Null,DateAdd("m",6,[Date_completion]))

Microsoft Access