Table/form calculation

neilmcmor

Registered User.
Local time
Today, 18:22
Joined
Aug 9, 2007
Messages
70
Is it posible to perform calculations within a table or data entry form. I have a date of birth field and an age field. I have an Update Action Query that automatically works out the date, (See below). However if I design the form with a close form event that triggers the query I get the confirmation message. I can only supress all Action queries confirmation messages or none at all and I do not want to disable this. Therefore I would like the age to be calculated within the table, (or form if that was possible). However I do not know how to do it.

DateDiff("yyyy",[DateofBirth],Now())+Int(Format(Now(),"mmdd")<Format([DateofBirth],"mmdd"))
 
Since you already have the date of birth you do not need to store the age, it can be calculated at any time
 
Thanks Rich

I never thought of it that way. I have deleted the Age field and taken your advice. thanks
 

Users who are viewing this thread

Back
Top Bottom