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 / February 2008

Tip: Looking for answers? Try searching our database.

Number problem in Mail Merge field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lynda - 25 Feb 2008 19:59 GMT
I have an Access database query that computes a student's class rank in
deciles.  This works fine in Access, but when I merge it in a Word Document,
Word changes the decile.  For example, I have computed a decile of 4 for a
student, but Word displays it as a 10.  When I look at the underlying record
source in Word, it shows the 4 as a 10 in the Access field.

Can anyone tell me what is going on here?  Why doesn't Word see the real
number?
Doug Robbins - Word MVP - 26 Feb 2008 09:03 GMT
You could try the different methods of connecting to the data source that
will become available if you select Options from the Tools menu in Word and
then go to the General tab and check the box against the "Confirm file
conversions at open" item.

An alternative would be to use a query in access as the data source and
apply the Format() function to the decile field to convert it to text.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have an Access database query that computes a student's class rank in
>deciles.  This works fine in Access, but when I merge it in a Word
[quoted text clipped - 5 lines]
> Can anyone tell me what is going on here?  Why doesn't Word see the real
> number?
Peter Jamieson - 26 Feb 2008 09:54 GMT
Are you in a position to look at the defintions of the relevant tables in
Access?

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

>I have an Access database query that computes a student's class rank in
>deciles.  This works fine in Access, but when I merge it in a Word
[quoted text clipped - 5 lines]
> Can anyone tell me what is going on here?  Why doesn't Word see the real
> number?
Lynda - 26 Feb 2008 13:14 GMT
kGood Morning:

Yes, I am in a position to look at the definitions in the relevant tables.
However, in this case, the decile generated is calculated in the query so is
not a field in a table.  The strange thing is that Word reads the same
calculated field correctly in some cases, but incorrectly in others.  It
seems to be random.  I have tried everything I can think of, but have not
encountered a solution yet.  When I look at the data in Word, the number has
already been changed when Word opens the data source--even though the number
in the query in Access is correct.

> Are you in a position to look at the defintions of the relevant tables in
> Access?
[quoted text clipped - 8 lines]
>> Can anyone tell me what is going on here?  Why doesn't Word see the real
>> number?
Peter Jamieson - 26 Feb 2008 13:53 GMT
BTW, do try Doug's suggestion if you haven't already.

Things worth looking at:
a. assuming the value in the query originates from a table, what is the
data type of the column in that table? Although it seems rather unlikely to
me, if it happens to be defined as a "Currency" type column, there are
problems with that type.
b. does the value actually come from a lookup table (this may seem unlikely
given that we're just talking about a number, but in this case I wondered
whether a lookupmight be used, e.g. to limit the possible values to a
particular subset)
c. of maybe the value is calculated in a function?
d. also perhaps worth modifying the query code so that the value is
returned as a specific type, e.g. using the cint() function.

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

> kGood Morning:
>
[quoted text clipped - 19 lines]
>>> Can anyone tell me what is going on here?  Why doesn't Word see the real
>>> number?
Lynda - 26 Feb 2008 18:37 GMT
I am able to get the correct results when I take Doug's suggestion of
confirming the data source on opening.  When I chose DDE, then the problem
went away and the true number was retrained.  However, this would mean that
everyone I work with would have to change their Word options.  I was hoping
for a solution that would be simpler, but this does work.

The value that has been problematic is an integer that is calculated in an
Access query--it is not formatted as currency.  I did try the CINT function,
but got the same results with Word changing the number on merge.  I even
converted the number to a text field, but Word still saw it differently.

Lynda

> BTW, do try Doug's suggestion if you haven't already.
>
[quoted text clipped - 34 lines]
>>>> Can anyone tell me what is going on here?  Why doesn't Word see the
>>>> real number?
Doug Robbins - Word MVP - 26 Feb 2008 19:05 GMT
Try the other suggestion of applying the Format() function in the query.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I am able to get the correct results when I take Doug's suggestion of
>confirming the data source on opening.  When I chose DDE, then the problem
[quoted text clipped - 48 lines]
>>>>> Can anyone tell me what is going on here?  Why doesn't Word see the
>>>>> real number?
Peter Jamieson - 27 Feb 2008 09:26 GMT
Hmm, you could also try cstr().

Can you provide the query SQL?

Signature

Peter Jamieson
http://tips.pjmsn.me.uk

>I am able to get the correct results when I take Doug's suggestion of
>confirming the data source on opening.  When I chose DDE, then the problem
[quoted text clipped - 48 lines]
>>>>> Can anyone tell me what is going on here?  Why doesn't Word see the
>>>>> real number?
 
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.