View Single Post
  #9   Report Post  
Posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default fields queries and utter disaster

Yes Bob, that would be my understanding and I always maintain that data
manipulation is best done in the data source.

Looking now in the original newsgroup to which this was posted
(microsoft.public.mac.office.word), I see that the OP posted a couple of
follow ups to his original post, the most telling of which states:

Quote

I will settle for an even easier version ... The user is prompted for
an input in the form of a number (id2) and then the corresponding id1
will be printed as well as id2

like this

id1 - id2

Unquote

If it was Access, I would say the form into which the user eterns the id2
should be in the database and the merge should be initiated from there,
possibly making use of the information on Albert Kallal's site at:

http://www.members.shaw.ca/AlbertKal...rge/index.html



--
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

"CyberTaz" wrote in message
.. .
Hi Doug, et al -

It sounds to me like the 2 tables are related using ID1 as the common
field
(Primary Key of Table1, Foreign Key of Table2). I'm not familiar with
MySQL,
but in Access & others, it would seem to me that a simple query in the
database would provide the record set the user needs, matching records on
the basis of the common field. An inner join would return just the
matching
records & the query should be constructed to return only the 2 required
fields of data (ID1 & ID2) for the matching records.

It seems far simpler to me to do this in the database & use the *query* as
the data source rather than trying to get Word to query the two tables.

What isn't clear (to me) is whether the OP wants to do a *merge*, with the
user choosing which of the found records to include, or whether this doc
is
to be generated for one recipient at a time with the user being prompted
for
an 'ID2' criteria.

Does this make sense?

HTH |:)
Bob Jones
[MVP] Office:Mac



On 4/30/06 2:23 AM, in article , "Doug
Robbins - Word MVP" wrote:

Aside from the issues that have been raised by Peter, does anyone
understand
what the OP means by:

I have a data source that contains two tables - table one has an id1
and some other fields and id1 is the primary key, table2 has as its
primary key id2 but also contains id1 from table1 for linking.

I want my word document to ask for a value for id2. And the select id1
and id2 if and only if table1.id1 equals table2.id1 and table2.id2
contains the value that i was asked for intially.