A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Data merged from 2007Access to Word shows ID # not correct data ne



 
 
Thread Tools Display Modes
  #1  
Old March 18th, 2010, 02:18 PM posted to microsoft.public.word.mailmerge.fields
Jeff
external usenet poster
 
Posts: 26
Default Data merged from 2007Access to Word shows ID # not correct data ne

When merging from a Access 2007 table to Word 2007, I cannot get the merged
field to display the proper data. It is only displaying the ID # of that
field. So rather than getting the Product name of "Widget", I'm getting "3"
which is the coresponding ID for widget. The product column in Access does
look up to another table but it is bound to the correct data so I see
"Widget" in the table not "3". It's only when it merges with Word that I see
"3" not "Widget"
  #2  
Old March 18th, 2010, 11:10 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Data merged from 2007Access to Word shows ID # not correct datane

I believe that in this case you will probably have to write an Access
query that explicitly joins your table with the Widget table, e.g. where
the SQL is either something like

SELECT * FROM mytable, Widget
WHERE mytable.WidgetID = Widget.WidgetID

or something like

SELECT * FROM mytable
INNER JOIN Widget ON mytable.WidgetID = Widget.WidgetID

Then use that query as your data source.

The basic problem is that Access itself knows that the field is a lookup
and knows that it should display the product name instead of the ID.
However, if you issue a Jet query against mytable alone, you just get
the fields from mytable, i.e. WidgetID, not WidgetName. And that's what
Word will typically do when it gets data from Access.

That said, I have never qute got to the bottom of this problem because
in some cases Word seems to get WidgetName instead of WidgetID but in
others it does not. Perhaps it has something to do with the way the
lookup is defined.

Peter Jamieson

http://tips.pjmsn.me.uk

On 18/03/2010 13:18, Jeff wrote:
When merging from a Access 2007 table to Word 2007, I cannot get the merged
field to display the proper data. It is only displaying the ID # of that
field. So rather than getting the Product name of "Widget", I'm getting "3"
which is the coresponding ID for widget. The product column in Access does
look up to another table but it is bound to the correct data so I see
"Widget" in the table not "3". It's only when it merges with Word that I see
"3" not "Widget"

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.