Home Privacy Policy Feedback Link to us Site Map

MS Access: Set up a text box to display a date value when another field has a value in Access 2003/XP/2000/97


Question:  In Access 2003/XP/2000/97, 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]))