# ERROR

B

Bridget

I created and published a custom contacts form in Microsfot Outlook 2003.
Within the form I included code to automatically calculate the Age based on
the birthdate for the client, their spouse, and each of up to 6 children.
When applying the new form to existing clients (utilizing code to change the
message class), I'm finding that when I open the existing contacts, the Age
field is filled with #ERROR. When I re-enter the birthdate, the age
calculates properly, but upon saving and then reopening, I get the error once
again. I tried exporting the contacts and then importing without the
birthdates, in the case that maybe I could re-enter the birthdates manually
and take care of the error, but the error still appears. Any suggestions on
getting rid of this error? Here is the code I used for the age calculation
under the initial value of each age property (8 age fields in total for the
form):

IIf([Child 1 Birthday]<>"None",DateDiff("yyyy",[Child 1
Birthday],Date())-IIf(DateDiff("d",CDate(Month([Child 1 Birthday]) & "/" &
Day([Child 1 Birthday]) & "/" & Year(Date())),Date())<0,1,0),"")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top