Question DateAdd when interval field is null

pavlos

Registered User.
Local time
Today, 21:32
Joined
Mar 10, 2009
Messages
79
Hi,

what's the way of using DateAdd function to return blank instead of #error when the interval filed is null?

I did try the following expression but the results is string instead of date.

NewDate: IIf(IsNull(n)," ",DateAdd("m",n,date))

regards,
pavlos
 
Last edited:
Hi,

what's the way of using DateAdd function to return blank instead of #error when the interval filed is null?

I did try the following expression but the results is string instead of date.

NewDate: IIf(IsNull(n)," ",DateAdd("m",n,date))

regards,
pavlos
A blank field consistig of " " is a string with just one space character in it so Access has evaluated your expression correctly.
 
Thanks Rabbie,

so is there a way to have the function output as date format and at the same time not to display the #error when the interval field is null?
 
Last edited:
Use a dummy date instead that can then be filtered out as needs be
 
Cheers Rich,

i am not sure what you mean, please help further...
 
Rich is suggesting that instead of " " put say #01/01/1900# then this can be filtered out on any reports etc.

Brian
 

Users who are viewing this thread

Back
Top Bottom