var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: dateadd function
Here is my question. Ive added the following "=DateAdd("m",+[lngMntcIntv],[dtmMntcLast])" to the record source of a text box on a form. Where lngMntcIntv=x months and dtmMntcLast= x date.
The function works great except when the dtmMntcLast field is empty. In these situations, it displays "#Error".
Can something be done to display something else or nothing at all?
thanks in adavance!
You can use the IsNull() function or the Nz() function to test the validity of your variable. You can then do nothing, show an error message or add 0 months
Thanks JefB for your reply. Sounds logical, but have an ie: of syntax? Maybe its just this Cold I have but having trouble coming up with something.
Using the lines of code you posted:
You could use that to add 0 months if the value is null:
It should work properly, the IIF statement is as follow:
IIF(condition, true part, false part)