View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Unpredictable user promts

The following article describes the main reason why you get the prompts:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document"
at
http://support.microsoft.com?kbid=825765

Users with Word 2003 and later SPs of Word 2002 will probably see this
behaviour.

However, that doesn't explain why Word is trying to open the wrong query or
is returning the wrong data as you describe. Is your Access application
opening a Word document that already has a data source attached? or are you
using OpenDataSource to attach to the datasource? If it's "both" (or maybe
you are actually opening a Word template?) then that may (partially) explain
why the users are seeing the wrong data - I'd probably try starting with a
document and/or template that is not connected to a datasource.

Peter Jamieson


"Margaret Bartley" wrote in message
...
I have an Access application that is opening a Word document for mailmerge.
The users are unsophisticated. They push a button, see the result on
their
screen, and then print it out.

Occassionally - and I've not been able to figure out what makes this
happen - the user will see a dialog box with the Alert symbol (Yellow,
exclamation point) that says:

Microsoft Office Word

Opening the document will run the following SQL command:
SELECT * FROM [qryMailList_PR_Fam]
Data from your database will be place in the document. Do you want to
continue?
Yes No [-the default]


If the user actually reads the message (unlikely) they would probably
click
Yes, which is wrong. If they click Yes, the wrong data comes up. If they
click "No" then things proceed correctly.


What's going on? How can I stop this behavior? Like I said, most of the
time, this does not happen.

TIA
Margaret