Well, it seems as if you have found /a/ way to make things work.
As far as I know the connection to Access .mdb basically works. Although the
connection process can fail at a number of points, I haven't personally
experienced a crash at the point you describe. But a few questions:
a. which database format (Access 2002, 2000, older?) is this mdb?
b. is the database secured using user-level security
c. is the database on a network drive?
d. is the full path name of the database quite long?
I think I found a work-around. In the Select Data Source window, I
selected the New Source button which walked me
through setting up an ODBC DSN connection to my Access database. I'm not
clear on how this is different from
selecting an mdb in the original window. But once I completed setting up
the New Source, I was able to connect to
my database and run the merge.
Word can connect to the Access data in several different ways. There are
essentially 3 connection methods:
a. DDE (the default method in Word 2000 and earlier). This starts a copy of
the full Access program, which then opens the database using the "Jet"
database engine and provides the data back to Word.
b. ODBC (another method available to most versions of Word). This connects
via an ODBC driver using the settings specified in a "connection string" and
an ODBC DSN (as you have discovered). ODBC bypasses the Access program and
just uses the underlying Jet engine to get the data.
c. OLEDB. This method has only been available in Word since version 2002,
and is the default method in 2002 and 2003. OLEDB was in effect a
replacement for ODBC technology. You connect via an OLEDB provider using a
connection string.
There are several practical differences between the different connection
methods. There are certain things you can /only/ do using a DDE connection
(e.g. use queries that reference user-defined Access VBA functions, or
parameter queries). Also, data of numeric, date and boolean types may be
returned in different formats depending on the connection method..
Just to complicate matters, Word has at least two ways to connect to an
OLEDB data source:
d. the default way - you select a .mdb and Word stores all the connection
details in the current document. You should be able to see these details by
saving your Word document as a Web page and looking at the HTML using a
plain text editor.
e. using an "Office Data Connection" file (.odc file). In this case, the
connection information is stored in a separate file and Word may store
additional information in the document. In theory you can set up this type
of connection using the "New Source" button and choosing the Other/Advanced
option, then selecting the Microsoft Jet provider and filling in a number of
details.
As an additional complication, when you use method (d), Word will actually
try to connect to the data source using OLEDB first. If it fails, it may try
to connect using ODBC. If that fails, it may use the DDE approach. This can
be very confusing.
In case (d), there is a problem in that Word may truncate an OLEDB
connection string when it stores or manipulates it. That is particularly
likely to happen if the database path name is long. When this happens,
Word's behaviour is a bit uncertain. By which I mean that I don't know
exactly what it does. But you may find that using an ODBC connection works
because its connection strings are generally shorter than the ones used by
OLEDB.
NB, in order to use Patty's approach you have first to check Word
Tools|Options|General|Confirm conversions at open, then go through the
connection process again.
--
Peter Jamieson - Word MVP
Ann said:
Thanks for your response, Patty. When I click the Open Data Source icon,
the Select Data Source window appears, defaulted to Files of Type "All Data
Sources". I find my Access mdb file and click Open. That's when I receive
the error window asking if I want to send an error report to Microsoft. The
details of the error center on winword.exe ver 10.0.5522.0 and msjet40.dll
ver 4.0.8015.0, if that means anything to you. I've gotten the same results
when I set the File Type filter to Access Database files.
I think I found a work-around. In the Select Data Source window, I
selected the New Source button which walked me through setting up an ODBC
DSN connection to my Access database. I'm not clear on how this is
different from selecting an mdb in the original window. But once I
completed setting up the New Source, I was able to connect to my database
and run the merge.