forms - MS Access calculated fields changing to "#Error" -


i have form runs off of query , works swimmingly, or @ least appears. have 3 fields in question: id field, client name field, , age field. age field client's age @ signing of quote, calculated field using date of quote , client's dob.

the age calculation works upon first look. reason id , name fields in question because when double click them opens form, yet again works fine. problem when exit forms , come original form.

the age field of whatever record on changes "#error" instead of displaying. if click on different record in form age field changes "#error" well. seems happen every time , have no clue why.

has solved issue similar or have idea on how solve it?

thanks in advance!

update: changed open report rather form , issue still there.

the calculation in question: int(([effectivedate]-[dateofbirth])/365.25)

try calculating age way:

datediff("yyyy", [dateofbirth], [effectivedate]) + ([effectivedate] < dateserial(year([effectivedate]), month([dateofbirth]), day([dateofbirth]))) 

using method takes difference in years between date of birth , effective date, taking account person's birthday may not have passed yet date.

basically first part gets years , second part either adds 0 false or adds -1 true if effective date less birthday effective year (meaning hadn't passed yet)


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -