This is the likely source of your problem:
There are several types of query that Word 2007 cannot "see", or does not
execute as you might expect, when you try to use them as a Mail Merge data
source using the default connection method for Access (which is OLE DB),
including:
a. parameter queries
b. queries that invoke user-defined Access VBA functions
c. queries that invoke some of the financial series functions and one or
two other "non-user defined" VBA functions such as replace()
d. queries that use LIKE and wildcards
In most cases, the quickest way to get around these problems is to change
the connection method of the connection to DDE - in Word 2007, check Office
button->Word options->Advanced->Confirm file format conversion on open (near
the bottom), go through the connection process again, and you should see an
additional Confirm Data Source dialog box. If you see an entry like "MS
Access databases via DDE", select it. If you only see "OLE DB database
files" (typically if you are using a .accdb rather than a .mdb source),
check Show all, then locate and select that DDE option, and continue.
That said, DDE connections have their own problems, particularly in Office
2007 and particularly if the the database is located on a network.