Re: Auto-fill Custom Age field based on Date of Birth by GrandiJoos
GrandiJoos
Thu May 24 02:52:08 CDT 2007
Hi
First of all, its not common to store 'derived data'. You can derive
the age from the birth date and today so you don't want to store it
because it can cause data inconsistencies if not updated correctly.
Secondly, try to add your code in the form's onload event so it will
update the age when the form is loaded (you may want to take into
account the situation when there is no birth date set of course).
Hope this helps.
On 24 mei, 08:16, Sam <sam.mcla...@gmail.com> wrote:
> Hi,
>
> I was just wondering if anyone can help me with this.
>
> In the contact form we have a date/time field for date of birth, and a
> custom int field for Age. How would I go about auto-filling the age
> field depending on the date of birth of the client, as well as today's
> date? I tried an onchange event that works, however this won't update
> the Age field going forward after the initial data entry into the date
> of birth field.
>
> Thanks for all your help,
>
> Sam.