Has it anything to to with the length of the connection
It could do. It can be difficult to tell, because Word may try a sequence of
connection methods to get at the data (OLEDB, then ODBC, then DDE) and
presents different dialog boxes for each method.
When you select the table, do you just see a dialog box saying "Select
Table", a list of tables and queries (VIEWS, as they are described in this
dialog), and OK/Cancel? If so, the connection is via OLEDB and
a. I would normally expect it to work, because Word appears capable of
storing and using a long connection string, but
b. if you try to print the value of ActiveDocument.DataSource.ConnectString
in the VBA editor immediate pane, you will typically see Error 9121 "Buffer
for return string is too small" so you can only easily see the connection
string by saving your mail merge main document as HTML, then opening the
..htm file as a text file and looking for <w:MailMergeConnectString>
If the connection is via ODBC, you will probably see a login screen before
the table/query selection dialog. In the selection dialog you will see a
list, a database selection drop-down (which is likely to show a different
database from the one you selected), and Options, OK and Cancel buttons. If
the connection string is less than 255 characters, you will probably be OK.
If not, it will be truncated, and if the authentication information is lost
you will probably see yet another login dialog box. This is quite likely to
happen IMO if the database and the security database both have long path
names (which they typically will if they are both within a user's Documents
and Settings folders. If you can use short path names for one or bth, there
is a much better chance the string won't be truncated.
However, from what you say, I'd have to guess that there is a different
problem, which could be that you are using OLEDB and the default
authentication details (username Admin, no password, and no system database)
are still allowing access to the .mdb and the list of tables/queries, but
are not allowing access to the data in them. If you are /just/ seeing the
"Select Table" dialog I mentioned above, and are not seeing any dialog
requesting security info., this is probably what is happening.