Hi Mariatherp,
> I have set up a merge filter. If there is no data meeting the criteria
> the users will receive this message:
[quoted text clipped - 3 lines]
> options." At this point I would like a msg box to come up "goodbye" and
> close word. But Word allows the user to choose a new data source.
You'd have to handle all of this through a macro (VBA). Once you have the
merge filter defined in SQL syntax, don't send it to Word's .QueryString
property immediately.
Instead, use ADO or DAO to connect to the same data source, using this
SQL. Check the number of records in the recordset, and if it's 0, display
the message you wish. If it's >0, go ahead and do the Word stuff.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)