hide record/row

R

ryanb.

is it possible to hide a merge record if it is equal to zero? I basically
want it Word to do what it does with a null merge field... hide it!! I have
tried using the help feature to run an if... then.. else function, but I
keep getting an error. Basically, I need it to be:

If the field is >0 show the field
Else hide the field

Any help would be greatly appreciated.

ryanb.

Word XP
Windows 2K
 
G

Graham Mayor

{IF {Mergefield fieldname}<> 0 "{Mergefield fieldname}"}

should do the trick.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
R

ryanb.

Thanks Graham, but where would I insert this... below is the field code that
shows while it is toggled?

{MERGEFIELD "dPP" \# "$#,##0.00 ' PER BAG' " }

I tried using the insert word field|if..then..else feature, but that is for
text only, not formulas (at least that is how it appears to me.

Thanks,

ryanb.
 
R

ryanb.

allright... I was not using Ctrl+F9.... so figured that out... but how do I
get every field below the fields that hide to shift up one line? Right now,
there is a lot of blank space betweeen paragraphs when a field is hidden.

TIA,

ryanb.
Word XP
Win 2K
 
G

Graham Mayor

If you are using conditional fields that only print when the content is
present, then they go on the same line, so that their lack of presence
doesn't leave a gap. You can include the line feed in the field definition
eg:

{IF {Mergefield dpp} <> "" "{MERGEFIELD dPP \# "$#,##0.00 ' PER BAG' " }
" ""}{Your next field goes here.

The above should be two lines with " ""} on the second line.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 

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