Stop Age update once passed away (1 Viewer)

chellebell1689

Registered User.
Local time
Yesterday, 17:52
Joined
Mar 23, 2015
Messages
267
Hello,
I have a members detail form that shows all our information for a member of our church. In one field I have it update (only when the form opens) to show the member's current age. Is it possible to make it continue to update, until the pass away, then stop at the age they passed away at?

Thanks for the help!
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 20:52
Joined
Jan 23, 2006
Messages
15,397
Yes. But in order to know that X has passed away, you need something like:
a) dateOfDeath Date
b) IsDead Yes/no

You would need to check is DateOfDeath is filled in, or if IsDead is True, then stoppadding.
 

chellebell1689

Registered User.
Local time
Yesterday, 17:52
Joined
Mar 23, 2015
Messages
267
I do have a death date field. So how would I adjust the age field?
Here's the current control source:
=DateDiff("yyyy",[BIRTHDAY],Now())+Int(Format(Now(),"mmdd")<Format([BIRTHDAY],"mmdd"))
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 20:52
Joined
Jan 23, 2006
Messages
15,397
Untested but you could try
IIF(IsDate(DateDeathField),"Dead",DateDiff("yyyy",[BIRTHDAY],Now())+Int(Format(Now(),"mmdd")<Format([BIRTHDAY],"mmdd")) )

I would use vba to :

check if DateDeathField has a value
if it does then bypass any Age processing
if it does not, then use the routine you have that is working
 

Users who are viewing this thread

Top Bottom