Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2007

Tip: Looking for answers? Try searching our database.

Blank fields showing as zero

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nasscott - 06 May 2006 14:06 GMT
I am using Word mailmerge to print fields calculated in Access.  I want a
null or zero result to print as blank.  Should be simple but ... !!
Graham Mayor - 06 May 2006 14:23 GMT
Use a conditional field
{IF{Mergefield fieldname} <> 0 "{Mergefield Fieldname}"}
See also http://www.gmayor.com/formatting_word_fields.htm

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I am using Word mailmerge to print fields calculated in Access.  I
> want a null or zero result to print as blank.  Should be simple but
> ... !!
Nasscott - 07 May 2006 17:50 GMT
Thanks Graham - the conditional construct was beyond me but I found the
answer on your website - amazing what a couple of semicolons can do !

> Use a conditional field
> {IF{Mergefield fieldname} <> 0 "{Mergefield Fieldname}"}
[quoted text clipped - 3 lines]
> > want a null or zero result to print as blank.  Should be simple but
> > ... !!
macropod - 07 May 2006 06:36 GMT
Hi Nasscott,

To fix this:
. press Alt-F9 in your mailmerge document to toggle the field code display
on. You should see something like:
{Mergefield DataField} or {Mergefield DataField \# 0.00}
.edit the field code so that it formats the result how you want it. For
example:
{Mergefield DataField \# $,0.00;($,0.00);}
will show the value as dollars and cents, with -ve values in brackets, and
the final ';' suppresses 0 output.

If you're working with what is meant to be purely textual data, formatting
the field as {Mergefield DataField \# ;} will likewise suppress any 0s
(along with any other mixed alpha-numeric output).

If you need to show mixed alpha-numeric output, but suppress errant 0s, try:
{IF{Mergefield DataField}= 0 "" {Mergefield DataField}}
to do this, you'll need to:
. copy & paste your mergefield, so that you get
{Mergefield DataField} {Mergefield DataField}
.select both mergefields and press Ctrl-F9 (to wrap them in another field,
thus-
{{Mergefield DataField} {Mergefield DataField}}
. fill in around the field braces as indicated, taking special care with
spacing.

Cheers

> I am using Word mailmerge to print fields calculated in Access.  I want a
> null or zero result to print as blank.  Should be simple but ... !!
tamee - 19 Mar 2007 14:54 GMT
This is very useful to me.  But how do you convert date serial number from
excel to a particular date format in a merge field?

> Hi Nasscott,
>
[quoted text clipped - 27 lines]
> > I am using Word mailmerge to print fields calculated in Access.  I want a
> > null or zero result to print as blank.  Should be simple but ... !!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.