Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Paul Paul is offline
external usenet poster
 
Posts: 3
Default error messages when connecting to an MS Access query

I'm attempting to create a Mail Merge document using a Select query in MS
Access 2003, and I get error messages saying things like "Word was unable to
open the data source" or "Record 1 contained too few data fields." The
thing that puzzles me about this, however, is that I have no problem
connecting to a table in the same Access database. The problem only occurs
when I try to connect to a query.

Because of the data I need to merge into my document, however, I need to use
a query. Is there something I need to do when I'm trying to merge with data
in an Access query so that I can avoid these problems?

Thanks in advance,

Paul


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default error messages when connecting to an MS Access query

You will probably have difficulty in Word 2002 or later if your query has
any of the following:
a. runtime parameters (but then it probably would not be listed)
b. user-defined functions (i.e. functions written in Access VBA)
c. some of the financial series functions, and one or two other functions
such as "replace"
d. wildcards, e.g. used in a LIKE clause
e. references to data outside the Access database (this is a bit
hit-and-miss)

In most cases, you should be able to get around this by using the old DDE
method to connect - check Word Tools|Options|General|COnfirm conversions at
open, go through the connection process again, and select the DDE option
when it is offered.

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

"Paul" wrote in message
...
I'm attempting to create a Mail Merge document using a Select query in MS
Access 2003, and I get error messages saying things like "Word was unable
to open the data source" or "Record 1 contained too few data fields." The
thing that puzzles me about this, however, is that I have no problem
connecting to a table in the same Access database. The problem only
occurs when I try to connect to a query.

Because of the data I need to merge into my document, however, I need to
use a query. Is there something I need to do when I'm trying to merge
with data in an Access query so that I can avoid these problems?

Thanks in advance,

Paul


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Paul Ponzelli Paul Ponzelli is offline
external usenet poster
 
Posts: 1
Default error messages when connecting to an MS Access query

You're right, Peter, I have a user-defined function in my query.

I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection. One
alternative is to run a make-table query that creates a temporary table from
the single record to mail merge. I'll probably do something like that.

Thanks for your help with this.

Paul


"Peter Jamieson" wrote in message
...
You will probably have difficulty in Word 2002 or later if your query has
any of the following:
a. runtime parameters (but then it probably would not be listed)
b. user-defined functions (i.e. functions written in Access VBA)
c. some of the financial series functions, and one or two other functions
such as "replace"
d. wildcards, e.g. used in a LIKE clause
e. references to data outside the Access database (this is a bit
hit-and-miss)

In most cases, you should be able to get around this by using the old DDE
method to connect - check Word Tools|Options|General|COnfirm conversions
at open, go through the connection process again, and select the DDE
option when it is offered.

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

"Paul" wrote in message
...
I'm attempting to create a Mail Merge document using a Select query in MS
Access 2003, and I get error messages saying things like "Word was unable
to open the data source" or "Record 1 contained too few data fields."
The thing that puzzles me about this, however, is that I have no problem
connecting to a table in the same Access database. The problem only
occurs when I try to connect to a query.

Because of the data I need to merge into my document, however, I need to
use a query. Is there something I need to do when I'm trying to merge
with data in an Access query so that I can avoid these problems?

Thanks in advance,

Paul




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default error messages when connecting to an MS Access query

I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection.


When you try to make a DDE connection, if the database is not already open,
you can get problems because DDE starts Access, Access tries to open the
database, and may display one or more dialog boxes (e.g. the security dialog
box). They may not be displayed in front of the Word document, so you do not
know that you have to respond to something. Then they time out, and the DDE
connection fails. So it may be worth using Alt-tab to cycle through the
various Windows.

AFAIK with queries that contain UDFs, you either have to get DDE to work,
one way or another, or find a workaround that avoids the UDF. Only the
Access programme "understands" UDFs - no other method of getting at the
Access data really knows what they are.

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

"Paul Ponzelli" wrote in message
...
You're right, Peter, I have a user-defined function in my query.

I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection. One
alternative is to run a make-table query that creates a temporary table
from the single record to mail merge. I'll probably do something like
that.

Thanks for your help with this.

Paul


"Peter Jamieson" wrote in message
...
You will probably have difficulty in Word 2002 or later if your query has
any of the following:
a. runtime parameters (but then it probably would not be listed)
b. user-defined functions (i.e. functions written in Access VBA)
c. some of the financial series functions, and one or two other functions
such as "replace"
d. wildcards, e.g. used in a LIKE clause
e. references to data outside the Access database (this is a bit
hit-and-miss)

In most cases, you should be able to get around this by using the old DDE
method to connect - check Word Tools|Options|General|COnfirm conversions
at open, go through the connection process again, and select the DDE
option when it is offered.

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

"Paul" wrote in message
...
I'm attempting to create a Mail Merge document using a Select query in
MS Access 2003, and I get error messages saying things like "Word was
unable to open the data source" or "Record 1 contained too few data
fields." The thing that puzzles me about this, however, is that I have
no problem connecting to a table in the same Access database. The
problem only occurs when I try to connect to a query.

Because of the data I need to merge into my document, however, I need to
use a query. Is there something I need to do when I'm trying to merge
with data in an Access query so that I can avoid these problems?

Thanks in advance,

Paul





  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
James[_3_] James[_3_] is offline
external usenet poster
 
Posts: 1
Default error messages when connecting to an MS Access query

I'm actually opening the Word document from VBA in the Access database, so
it's already open. It's actually easy to run a Make Table query in Access,
so I'm going to try that to bypass the problem with the UDF.

Thanks, Peter




"Peter Jamieson" wrote in message
...
I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection.


When you try to make a DDE connection, if the database is not already
open, you can get problems because DDE starts Access, Access tries to open
the database, and may display one or more dialog boxes (e.g. the security
dialog box). They may not be displayed in front of the Word document, so
you do not know that you have to respond to something. Then they time out,
and the DDE connection fails. So it may be worth using Alt-tab to cycle
through the various Windows.

AFAIK with queries that contain UDFs, you either have to get DDE to work,
one way or another, or find a workaround that avoids the UDF. Only the
Access programme "understands" UDFs - no other method of getting at the
Access data really knows what they are.

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

"Paul Ponzelli" wrote in message
...
You're right, Peter, I have a user-defined function in my query.

I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection. One
alternative is to run a make-table query that creates a temporary table
from the single record to mail merge. I'll probably do something like
that.

Thanks for your help with this.

Paul


"Peter Jamieson" wrote in message
...
You will probably have difficulty in Word 2002 or later if your query
has any of the following:
a. runtime parameters (but then it probably would not be listed)
b. user-defined functions (i.e. functions written in Access VBA)
c. some of the financial series functions, and one or two other
functions such as "replace"
d. wildcards, e.g. used in a LIKE clause
e. references to data outside the Access database (this is a bit
hit-and-miss)

In most cases, you should be able to get around this by using the old
DDE method to connect - check Word Tools|Options|General|COnfirm
conversions at open, go through the connection process again, and select
the DDE option when it is offered.

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

"Paul" wrote in message
...
I'm attempting to create a Mail Merge document using a Select query in
MS Access 2003, and I get error messages saying things like "Word was
unable to open the data source" or "Record 1 contained too few data
fields." The thing that puzzles me about this, however, is that I have
no problem connecting to a table in the same Access database. The
problem only occurs when I try to connect to a query.

Because of the data I need to merge into my document, however, I need
to use a query. Is there something I need to do when I'm trying to
merge with data in an Access query so that I can avoid these problems?

Thanks in advance,

Paul







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access Database via DDE Not connecting George M Mailmerge 3 June 27th 07 02:46 PM
Error Messages Dolly Microsoft Word Help 4 January 30th 07 11:32 PM
Word 2003 - when closing receive 'Runtime Error 91' error messages RLC Web Microsoft Word Help 1 January 11th 06 06:16 AM
Error Messages Suzanne Kirchner Microsoft Word Help 1 April 27th 05 09:51 PM
error messages. hudkeekd Microsoft Word Help 1 March 27th 05 04:32 PM


All times are GMT +1. The time now is 02:35 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"