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  

fields queries and utter disaster



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2006, 09:16 AM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However, I
think your answer will be something along the lines of "You need to use the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
, "
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

  #2  
Old April 29th, 2006, 09:52 AM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

I don't really understand what you mean 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.


It just doesn't make sense. You are not saying what it is that you want
done if the condition is met.

Aside from that, the only way to do what you want will almost certainly be
to use a macro that is triggered by the Save or Print commands by having
macros with the same name as those commands.

You could use the InputBox() command to have the user enter a value, but it
might be more appropriate to throw up a userform that contains a combobox or
listbox that gets populated with the values of ID2 so that the user only
selects form the values that exist.

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

"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However, I
think your answer will be something along the lines of "You need to use
the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410



  #3  
Old April 29th, 2006, 10:38 AM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.


I had the impression that it was using Office X, but unfortunately I am much
more ignorant on Mac issues and can only experiment with Office 2004, i.e.
(a) do not know whether it is possible to connect directly using ODBC with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However, I
think your answer will be something along the lines of "You need to use
the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410



  #4  
Old April 29th, 2006, 01:23 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

My Bad... The OP did specify Office X...

In which case the following link may help:
http://www.microsoft.com/mac/otherpr...pid=usingoffic
ex&type=howto&article=/mac/LIBRARY/feature_articles/officex/xl_ODBC.xml


On 29/4/06 7:38 PM, in article , "Peter
Jamieson" wrote:

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.


I had the impression that it was using Office X, but unfortunately I am much
more ignorant on Mac issues and can only experiment with Office 2004, i.e.
(a) do not know whether it is possible to connect directly using ODBC with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However, I
think your answer will be something along the lines of "You need to use
the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410




--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

  #5  
Old April 29th, 2006, 05:54 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

Still no obvious way to do it here - it's possible to get the data via Excel
and the Excel VBA Help gives an example of how to do it programmatically,
but I haven't been able to get it to work so far (again, on Office 2004).
Next opportunity to look is in a couple of days' time, but I'd have thought
someone on the Mac side had had a thorough go at this and knows what's
feasible.

Peter jamieson


"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
My Bad... The OP did specify Office X...

In which case the following link may help:
http://www.microsoft.com/mac/otherpr...pid=usingoffic
ex&type=howto&article=/mac/LIBRARY/feature_articles/officex/xl_ODBC.xml


On 29/4/06 7:38 PM, in article ,
"Peter
Jamieson" wrote:

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.


I had the impression that it was using Office X, but unfortunately I am
much
more ignorant on Mac issues and can only experiment with Office 2004,
i.e.
(a) do not know whether it is possible to connect directly using ODBC
with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC
connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However,
I
think your answer will be something along the lines of "You need to use
the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410




--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410



  #6  
Old April 29th, 2006, 06:00 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

I suggest pinging JE McGimpsey. If anyone knows, he will.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: http://www.entourage.mvps.org/faq/index.html
AppleScripts for Entourage: http://macscripter.net/scriptbuilders/

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


From: Peter Jamieson
Newsgroups:
microsoft.public.mac.office.word,microsoft.public. word.mailmerge.fields
Date: Sat, 29 Apr 2006 17:54:19 +0100
Subject: fields queries and utter disaster

Still no obvious way to do it here - it's possible to get the data via Excel
and the Excel VBA Help gives an example of how to do it programmatically,
but I haven't been able to get it to work so far (again, on Office 2004).
Next opportunity to look is in a couple of days' time, but I'd have thought
someone on the Mac side had had a thorough go at this and knows what's
feasible.

Peter jamieson


"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
My Bad... The OP did specify Office X...

In which case the following link may help:
http://www.microsoft.com/mac/otherpr...pid=usingoffic
ex&type=howto&article=/mac/LIBRARY/feature_articles/officex/xl_ODBC.xml


On 29/4/06 7:38 PM, in article ,
"Peter
Jamieson" wrote:

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

I had the impression that it was using Office X, but unfortunately I am
much
more ignorant on Mac issues and can only experiment with Office 2004,
i.e.
(a) do not know whether it is possible to connect directly using ODBC
with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC
connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
I'm going to spit this off to the group that specialises in this kind of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist. However,
I
think your answer will be something along the lines of "You need to use
the
Database toolbar to insert the database into your data source as a Word
table." Once you have done that, you can then query the fields in that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined with
ASK but I've spent the better part of my day not getting any closer att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but only
once for each document .. so if its opened again it will not ask .. in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410




--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410




  #7  
Old April 30th, 2006, 07:23 AM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

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.


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

"Paul Berkowitz" wrote in message
...
I suggest pinging JE McGimpsey. If anyone knows, he will.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: http://www.entourage.mvps.org/faq/index.html
AppleScripts for Entourage: http://macscripter.net/scriptbuilders/

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


From: Peter Jamieson
Newsgroups:
microsoft.public.mac.office.word,microsoft.public. word.mailmerge.fields
Date: Sat, 29 Apr 2006 17:54:19 +0100
Subject: fields queries and utter disaster

Still no obvious way to do it here - it's possible to get the data via
Excel
and the Excel VBA Help gives an example of how to do it programmatically,
but I haven't been able to get it to work so far (again, on Office 2004).
Next opportunity to look is in a couple of days' time, but I'd have
thought
someone on the Mac side had had a thorough go at this and knows what's
feasible.

Peter jamieson


"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
My Bad... The OP did specify Office X...

In which case the following link may help:
http://www.microsoft.com/mac/otherpr...pid=usingoffic
ex&type=howto&article=/mac/LIBRARY/feature_articles/officex/xl_ODBC.xml


On 29/4/06 7:38 PM, in article ,
"Peter
Jamieson" wrote:

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind
of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are
doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

I had the impression that it was using Office X, but unfortunately I am
much
more ignorant on Mac issues and can only experiment with Office 2004,
i.e.
(a) do not know whether it is possible to connect directly using ODBC
with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is
a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC
connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote
in
message ...
I'm going to spit this off to the group that specialises in this kind
of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are
doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist.
However,
I
think your answer will be something along the lines of "You need to
use
the
Database toolbar to insert the database into your data source as a
Word
table." Once you have done that, you can then query the fields in
that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined
with
ASK but I've spent the better part of my day not getting any closer
att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but
only
once for each document .. so if its opened again it will not ask ..
in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical
Writer
Sydney, Australia +61 (0) 4 1209 1410




--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410






  #8  
Old April 30th, 2006, 02:12 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

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.


  #9  
Old April 30th, 2006, 04:52 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
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.




  #10  
Old April 30th, 2006, 08:49 PM posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
external usenet poster
 
Posts: n/a
Default fields queries and utter disaster

What's the best way to do that?

Peter Jamieson

"Paul Berkowitz" wrote in message
...
I suggest pinging JE McGimpsey. If anyone knows, he will.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: http://www.entourage.mvps.org/faq/index.html
AppleScripts for Entourage: http://macscripter.net/scriptbuilders/

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.


From: Peter Jamieson
Newsgroups:
microsoft.public.mac.office.word,microsoft.public. word.mailmerge.fields
Date: Sat, 29 Apr 2006 17:54:19 +0100
Subject: fields queries and utter disaster

Still no obvious way to do it here - it's possible to get the data via
Excel
and the Excel VBA Help gives an example of how to do it programmatically,
but I haven't been able to get it to work so far (again, on Office 2004).
Next opportunity to look is in a couple of days' time, but I'd have
thought
someone on the Mac side had had a thorough go at this and knows what's
feasible.

Peter jamieson


"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
My Bad... The OP did specify Office X...

In which case the following link may help:
http://www.microsoft.com/mac/otherpr...pid=usingoffic
ex&type=howto&article=/mac/LIBRARY/feature_articles/officex/xl_ODBC.xml


On 29/4/06 7:38 PM, in article ,
"Peter
Jamieson" wrote:

Hi John etc.,

I'm going to spit this off to the group that specialises in this kind
of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are
doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

I had the impression that it was using Office X, but unfortunately I am
much
more ignorant on Mac issues and can only experiment with Office 2004,
i.e.
(a) do not know whether it is possible to connect directly using ODBC
with
Office X and
(b) what the appropriate syntax for OpenDataSource (or a { DATABASE }
field, if that is what the questioner wants) would be on Mac.

On the Windows version this is doable partly because it's possible to
specify "" as the Name in the OpenDataSource call when the ODBC DSN is
a
machine DSN (i.e. in the registry), or use a file DSN.

If someone on the Mac side knows the answer to the general ODBC
connectivity
questions maybe we could get a little bit further.

Peter Jamieson

John McGhie [MVP - Word and Word Macintosh]" wrote
in
message ...
I'm going to spit this off to the group that specialises in this kind
of
thing, however, my first question is "How did you get a connection to
mysql
from Microsoft Office in the first place?"

The people in the mailmergefields group need to know that you are
doing
this
in Macintosh OS 10.4.5 (Unix) using Microsoft Office 2004.

This is a specialist area, and I am by no means a specialist.
However,
I
think your answer will be something along the lines of "You need to
use
the
Database toolbar to insert the database into your data source as a
Word
table." Once you have done that, you can then query the fields in
that
table.

Hope this helps

On 28/4/06 8:37 PM, in article
,
"
wrote:

Hi

I'm trying to solve the following.

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.

or to put it in mysql language

SELECT Table1.ID1, Table2.ID1 FROM TABLE1, TABLE2 WHERE Table1.ID1 =
TABLE2.ID1 AND TABLE2.ID2 = ?

I can access the table, my problem is that I cannot figure out the
proper syntax for MSWords fields

As far as I can tell I should be able to do this using IF combined
with
ASK but I've spent the better part of my day not getting any closer
att
all.

I would really appreciate any help.

I might add i would like this to be don on saving or printing but
only
once for each document .. so if its opened again it will not ask ..
in
other words if the fields are filled in dont ask. But I'll settle for
just getting the first part!


--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical
Writer
Sydney, Australia +61 (0) 4 1209 1410




--

Please reply to the newsgroup to maintain the thread. Please do not
email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410






 




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:24 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.