Currency-Formatted Numbers Round When Merged Using ODBC

Last reviewed: February 5, 1998
Article ID: Q123700
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

SYMPTOMS

Numbers formatted as currency and written to the thousandths (for example, 123.875) in Microsoft Access are rounded to the nearest hundredths (123.88) when merged to Microsoft Word using ODBC. (This behavior does not occur if you are merging a Microsoft Access database using DDE.) The expected behavior is for the number to not be rounded.

CAUSE

Microsoft Access is rounding the number before passing it to Word for Windows.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 2.0 for Windows. This problem was corrected in Word version 7.0 for Windows 95.

WORKAROUND

To keep the number from rounding when merged to Word, open the database in Microsoft Access, and change the formatting for the number to a general number format. Although this format removes the dollar sign, you can correct this in Word by using one of the following methods:

Method 1: Include a numeric picture switch in the mergefield, so that the

          field looks like this:

             {mergefield number \# $####,0.00}

Method 2: Place a dollar sign in the main document immediately preceding
          the mergefield that contains the number.


KBCategory:
KBSubcategory: kbmerge
Additional reference words: 6.0 6.0a 6.0c winword mail merge print
word6 merge access $ dollar sign round rounded number currency
Keywords : kbmerge kbinterop
Version : 6.0 6.0a 6.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.