I am trying to calculate if a member is 18 or over. I
have a merge field for date of birth. I have very
complicated if statement also and not sure how to
combine "ands" and "ors".
if alternate address exists
and if over 18 then use that alt address
and if under 18 then
if permission to use alt address, use alt address
if not permission to use alt address, use home addr
if alternate address not exists, use home address
someone please help!!!
thanks
Greg - 09 Sep 2004 20:38 GMT
Gay
The following example assumes that you already have data
in a bookmark or mergefield for the following variables
PTU = Permission to Use
AA = Alternate Address
HA = Home Address
Years = Age in Years
If that is the case, I was able to make the following work:
{IF {AA} <> ""{IF{YEARS} > 17{IF {PTU} + "Yes"{AA}{HA}}
{HA}}{HA}}
>-----Original Message-----
>I am trying to calculate if a member is 18 or over. I
[quoted text clipped - 12 lines]
>thanks
>.
Gay Dietz - 09 Sep 2004 21:12 GMT
Thank you!
by any chance, do you know how to (using word 2000)
calculate a person's age with a merge field of date of
birth? Is there a year function or anything like you use
with VB?
>-----Original Message-----
>Gay
[quoted text clipped - 31 lines]
>>
>.
Greg Maxey - 10 Sep 2004 00:10 GMT
Gay,
A calculated date field IMO is brutally complicated, but it can be achieved.
If you are content with years only and not concerned with months and days,
then I think that you could get by with:
{Set Years{={Date\@ yyyy}-{MergeField DOB \@ yyyy }-({Date \@
MMM}<{MergeField DOB \@ MMM})-({Date \@ MMM}={MergeField DOB \@ MMM})*({Date
\@ d}<{MergeField DOB \@ d})}}
This will SET a bookmark name Years to the value of age in years.

Signature
Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
To e-mail, edit out the "w...spam" in gmaxey@whamspammvps.org
> Thank you!
>
[quoted text clipped - 36 lines]
>>>
>> .
Doug Robbins - 10 Sep 2004 00:39 GMT
You can use a formatting switch to return just the year from a date.
See "Formatting Word fields with switches" on fellow MVP Graham Mayor's
website at
http://www.gmayor.com/formatting_word_fields.htm
But if your data source is Excel or Access, you are better off to do the
data manipulation there.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Thank you!
>
[quoted text clipped - 37 lines]
>>>
>>.
macropod - 10 Sep 2004 23:30 GMT
Hi Gay,
To see how to calculate someone's age, down to the day, plus more than you
ever thought you'd want to do with dates, download the Word file at:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
(url all one line)
Cheers
> I am trying to calculate if a member is 18 or over. I
> have a merge field for date of birth. I have very
[quoted text clipped - 10 lines]
> someone please help!!!
> thanks
Gay Dietz - 16 Sep 2004 19:29 GMT
Everyone... thanks for all your help and support. This
merge stuff is all new to me and I got this project just
coming back from maternity leave (have TRIPLETS) so I
cannot think straight.. actually, not doing too good
thinking period. Lack of sleep :)
ONCE AGAIN thanks!
>-----Original Message-----
>Hi Gay,
[quoted text clipped - 27 lines]
>
>.