View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
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"