hjgoldstein
Programmer
Hi guys.
Simple situation, I am sure simple solution too.
I have a table with a number of fields in it.
One of the fields is "CustLastAudit" and is a date field, another is "CustAudFreq" and is a Long Integer referring to a number of months.
A further field, "CustNextAudDueDate" which should be calculated from the previous 2. That is to say, add the number of months in "CustAudFreq" to the date in "CustLastAudit" to get the desired result.
The associated form has the first two fields in bound controls. I have a text box with the following as Control Source:
=DateSerial(Year([CustLastAudit]);Month([CustLastAudit])+([CustAudFreq]);Day([CustLastAudit]))
All is fine except when "CustLastAudit" is empty.
I have tried various permutations of IIf and NZ but with no joy.
Have you any ideas what I can put in the Control Source to trap the error?
Hope you can help.
Thanks.
Howard
It is time for pacifists to stand up and fight for their beliefs.
Simple situation, I am sure simple solution too.
I have a table with a number of fields in it.
One of the fields is "CustLastAudit" and is a date field, another is "CustAudFreq" and is a Long Integer referring to a number of months.
A further field, "CustNextAudDueDate" which should be calculated from the previous 2. That is to say, add the number of months in "CustAudFreq" to the date in "CustLastAudit" to get the desired result.
The associated form has the first two fields in bound controls. I have a text box with the following as Control Source:
=DateSerial(Year([CustLastAudit]);Month([CustLastAudit])+([CustAudFreq]);Day([CustLastAudit]))
All is fine except when "CustLastAudit" is empty.
I have tried various permutations of IIf and NZ but with no joy.
Have you any ideas what I can put in the Control Source to trap the error?
Hope you can help.
Thanks.
Howard
It is time for pacifists to stand up and fight for their beliefs.