The NZ function in a calculated text box

eddie442

Registered User.
Local time
Today, 01:15
Joined
Jan 7, 2005
Messages
16
Hello

I am using the DateAdd function in a calculated text box. It gets it's data from a combo box. The data looks like this:

=DateAdd("m",[CalibrationInterval],[DateofCalibration])

All works well unless there is no date in the DateofCalibration field. Can I use the NZ function within the above code, or will I need to incorporate it elsewhere?

Many Thanks

Dave
 
The Nz would replace the null date with 0 which is a date two centuries ago and you obviously don't want.

Use the IsNull() function in conjunction with an Immediate If.

=IIf(IsNull([DateofCalibration]),"-",DateAdd("m",[CalibrationInterval],[DateofCalibration])
 
Thanks, that's excellent. Just what I need. Cheers!
 

Users who are viewing this thread

Back
Top Bottom