Ok I worked on it and I have this code bite which works.

 Dim cdate as string
 Dim cyear, pAge as integer
 Dim d as New Date

 // Get Current Year
 cdate = d.ShortDate
 cyear = d.year

 // Calculate Patient Age
 pAge = cyear - val(Right(me.text, 4))
 conAge.text = str(pAge)

conAge.text is an editfield for the Contacts Age
conDOB.text(me.text) is an editfield for the Contacts DOB (DateOfBirth)

Note: This is just based on the YEAR so it may be off some what! Also I have the Input Mask set to ##/##/#### based on USA standards. [MM/DD/YYYY]

Now I know there are some error checks I should do but I am bad at figuring out the error checking protocals.

Jonathon



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.13/463 - Release Date: 10/4/2006

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to