Mergefield question

M

MDI Anne

I have a database created in Access, and am pulling info from it to create
letters. I have an expiration date in the database that, when put into my
letter, I would like to add 1 year to the date. {MERGEFIELD "Expiration_Date"}

I've tried doing a +1, and variations of that, but am getting no where. Any
help would be greatly appreciated.

Thanx!!
 
M

macropod

Hi MDI Anne,

The MERGEFIELD solution depends on whether you're dealing with a day, month
& year, month & year or just a year. If its the last of these, it's simply a
matter of embedding your MERGEFIELD in a FORMULA field coded like:
{={MERGEFIELD "Expiration_Date"}+1}
For anything more complicated, check out the entries under 'Calculate a
month and year, using n years delay' and 'Calculate a day, date, month and
year, using n years delay' in my Date Calc 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
To use either of those fields, you could replace the 'DATE' references with
your {MERGEFIELD "Expiration_Date"} field. Alternatively, you could add
another SET field, like:
{SET ExpDate {MERGEFIELD "Expiration_Date"}}
immediately above or below the '{SET Delay 1}' line and replace the 'DATE'
references with 'ExpDate'.

Cheers
 
M

MDI Anne

Mac...

Have tried your formula suggestion and I get the following... !Syntax Error, {

and yes, all that I want to do is add a year to the date...



macropod said:
Hi MDI Anne,

The MERGEFIELD solution depends on whether you're dealing with a day, month
& year, month & year or just a year. If its the last of these, it's simply a
matter of embedding your MERGEFIELD in a FORMULA field coded like:
{={MERGEFIELD "Expiration_Date"}+1}
For anything more complicated, check out the entries under 'Calculate a
month and year, using n years delay' and 'Calculate a day, date, month and
year, using n years delay' in my Date Calc 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
To use either of those fields, you could replace the 'DATE' references with
your {MERGEFIELD "Expiration_Date"} field. Alternatively, you could add
another SET field, like:
{SET ExpDate {MERGEFIELD "Expiration_Date"}}
immediately above or below the '{SET Delay 1}' line and replace the 'DATE'
references with 'ExpDate'.

Cheers

--
macropod
[MVP - Microsoft Word]


MDI Anne said:
I have a database created in Access, and am pulling info from it to create
letters. I have an expiration date in the database that, when put into my
letter, I would like to add 1 year to the date. {MERGEFIELD "Expiration_Date"}

I've tried doing a +1, and variations of that, but am getting no where. Any
help would be greatly appreciated.

Thanx!!
 
G

Graham Mayor

You will get a syntax error if you haven't entered it correctly. You need to
use CTRL+F9 for the field boundaries.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

MDI said:
Mac...

Have tried your formula suggestion and I get the following... !Syntax
Error, {

and yes, all that I want to do is add a year to the date...



macropod said:
Hi MDI Anne,

The MERGEFIELD solution depends on whether you're dealing with a
day, month & year, month & year or just a year. If its the last of
these, it's simply a matter of embedding your MERGEFIELD in a
FORMULA field coded like: {={MERGEFIELD "Expiration_Date"}+1}
For anything more complicated, check out the entries under
'Calculate a month and year, using n years delay' and 'Calculate a
day, date, month and year, using n years delay' in my Date Calc
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
To use either of those fields, you could replace the 'DATE'
references with your {MERGEFIELD "Expiration_Date"} field.
Alternatively, you could add another SET field, like:
{SET ExpDate {MERGEFIELD "Expiration_Date"}}
immediately above or below the '{SET Delay 1}' line and replace the
'DATE' references with 'ExpDate'.

Cheers

--
macropod
[MVP - Microsoft Word]


MDI Anne said:
I have a database created in Access, and am pulling info from it to
create letters. I have an expiration date in the database that,
when put into my letter, I would like to add 1 year to the date.
{MERGEFIELD "Expiration_Date"}

I've tried doing a +1, and variations of that, but am getting no
where. Any help would be greatly appreciated.

Thanx!!
 
M

MDI Anne

Graham, you were totally correct! So, I entered it in using the
CTRL+F9...now all I get is the number 1.

This is so frustrating, not because of the awesome help I'm getting, but
because I know things can be done...but only know enough to get myself into
trouble! :)





Graham Mayor said:
You will get a syntax error if you haven't entered it correctly. You need to
use CTRL+F9 for the field boundaries.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

MDI said:
Mac...

Have tried your formula suggestion and I get the following... !Syntax
Error, {

and yes, all that I want to do is add a year to the date...



macropod said:
Hi MDI Anne,

The MERGEFIELD solution depends on whether you're dealing with a
day, month & year, month & year or just a year. If its the last of
these, it's simply a matter of embedding your MERGEFIELD in a
FORMULA field coded like: {={MERGEFIELD "Expiration_Date"}+1}
For anything more complicated, check out the entries under
'Calculate a month and year, using n years delay' and 'Calculate a
day, date, month and year, using n years delay' in my Date Calc
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
To use either of those fields, you could replace the 'DATE'
references with your {MERGEFIELD "Expiration_Date"} field.
Alternatively, you could add another SET field, like:
{SET ExpDate {MERGEFIELD "Expiration_Date"}}
immediately above or below the '{SET Delay 1}' line and replace the
'DATE' references with 'ExpDate'.

Cheers

--
macropod
[MVP - Microsoft Word]


I have a database created in Access, and am pulling info from it to
create letters. I have an expiration date in the database that,
when put into my letter, I would like to add 1 year to the date.
{MERGEFIELD "Expiration_Date"}

I've tried doing a +1, and variations of that, but am getting no
where. Any help would be greatly appreciated.

Thanx!!
 
G

Graham Mayor

That's what will happen if the expiration date is a complete date and not
simply a year. You need to read the link macropod posted and download his
date field file - then modify the appropriate field as indicated earlier in
the thread.

You should be able to get away with

{MERGEFIELD Expiration_Date \@ "d MMM "}{={MERGEFIELD Expiration_Date \@
"YYYY"} + 1}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

MDI said:
Graham, you were totally correct! So, I entered it in using the
CTRL+F9...now all I get is the number 1.

This is so frustrating, not because of the awesome help I'm getting,
but because I know things can be done...but only know enough to get
myself into trouble! :)





Graham Mayor said:
You will get a syntax error if you haven't entered it correctly. You
need to use CTRL+F9 for the field boundaries.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

MDI said:
Mac...

Have tried your formula suggestion and I get the following...
!Syntax Error, {

and yes, all that I want to do is add a year to the date...



:

Hi MDI Anne,

The MERGEFIELD solution depends on whether you're dealing with a
day, month & year, month & year or just a year. If its the last of
these, it's simply a matter of embedding your MERGEFIELD in a
FORMULA field coded like: {={MERGEFIELD "Expiration_Date"}+1}
For anything more complicated, check out the entries under
'Calculate a month and year, using n years delay' and 'Calculate a
day, date, month and year, using n years delay' in my Date Calc
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
To use either of those fields, you could replace the 'DATE'
references with your {MERGEFIELD "Expiration_Date"} field.
Alternatively, you could add another SET field, like:
{SET ExpDate {MERGEFIELD "Expiration_Date"}}
immediately above or below the '{SET Delay 1}' line and replace the
'DATE' references with 'ExpDate'.

Cheers

--
macropod
[MVP - Microsoft Word]


I have a database created in Access, and am pulling info from it
to create letters. I have an expiration date in the database
that, when put into my letter, I would like to add 1 year to the
date. {MERGEFIELD "Expiration_Date"}

I've tried doing a +1, and variations of that, but am getting no
where. Any help would be greatly appreciated.

Thanx!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top