Want to count Age from DOB to Admission Date (1 Viewer)

md-rahim

Registered User.
Local time
Today, 09:59
Joined
Dec 7, 2012
Messages
36
Dear All,

Please help me to count the age from DOB to Admission date.

Please see the attachment and if possible add your formula.

Please help me
 

Attachments

  • Sample Age Count.mdb
    136 KB · Views: 91

md-rahim

Registered User.
Local time
Today, 09:59
Joined
Dec 7, 2012
Messages
36
I can't fix the problem. Can anybody help me with another process or plz see the attachted database and solve my problem plz. plz plz
 

Brianwarnock

Retired
Local time
Today, 03:59
Joined
Jun 2, 2003
Messages
12,701
I cannot look at you DB at the moment but if all you require is an age calculation then

Datediff("yyyy",DOB,AdDate)+Int(Format(DOB,"mmdd")<Format(AdDate,"mmdd"))

JBB Despite what it says in the article /365.25 does not give an accurate age as it fails around the anniversary date.

Brian
 

md-rahim

Registered User.
Local time
Today, 09:59
Joined
Dec 7, 2012
Messages
36
I can't add this formula anybody help me please. please add this formula into the attachted database.

please
 

Brianwarnock

Retired
Local time
Today, 03:59
Joined
Jun 2, 2003
Messages
12,701
2 problems

1 Naming do not give objects the same name your table and your Form are both named Table1, this is of course Microsofts fault with their defalts.
prefix tables with Tbl and Forms with Frm.
I think that there are full naming conventions explained in the forum.

2 Your table contains DOB and you are trying to store the calculated Age in there. That should not be done as the age will rapidly be wrong. Store the DOB and calculate the age in queries or on forms for display as required using the formula given. I a Form it would be in the control source of an unbound text box.


Brian
 

Users who are viewing this thread

Top Bottom