Using IF to give the value of a bookmark

A

Art

How do you use the IF field code to display the value of a bookmark and
blank if the value of the bookmarked field is 1.

I was using the code { IF { RemainMonthPayment} =1, " ", {LastPayment}}
but all I get is an error.

Please help. Thanks.

Art
 
G

Graham Mayor

Is this a mail merge? Are these merge fields? If they are then
{IF {Mergefield RemainMonthPayment} <> 1 "{Mergefield Last Payment}"}
If they are both bookmarks eg from a form then
{IF {RemainMonthPayment} <> 1 "{Last Payment}"}
will do the trick.
In your example, you don't need the commas and you do need a space after the
=
In a form you will need to set the properties of the relevant fields to
calculate on exit.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

Art

Thank you for the reply.

By the way, the form does not use merge fields. I tried using the
second code you mentioned in my Word document

{IF {RemainMonthPayment} <> 1 "{Last Payment}"}

but when I update the field it gives the result {Last Payment}

Both RemainMonthPayment (integer) and Last Payment (date) are bookmarks
from the form.

Need your help on this one.
 
G

Graham Mayor

You must insert all the field boundaries {} with CTRL+F9 and toggle the
display ALT+F9 to show results as opposed to construction.
 

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