> "Opening this document will run the following SQL command. Select * from
> [ClaimsQuery]. Data from the database will be placed in the document, do
> you
> want to continue? Y/N ?"
To get rid of the above message, see the following article:
http://support.microsoft.com/kb/825765/en-us
If the query references the Form (which it can do in Access), then when Word
tries to execute the query, it will fail becuase the form isn't loaded. (At
least, I think that is what is happening in this case. So either you need to
ensure that your Mailmerge /only/ executes when the form is open, or you
need to write a query that will return the correct results whether or not
the form is open (or perhaps use another approach such as setting up a table
to contain the results you want to merge.
Peter Jamieson
> Hello:
>
[quoted text clipped - 37 lines]
>
> Any help or ideas would be greatly appreciated and welcomed.
Technojunkie - 17 Nov 2006 21:34 GMT
Hi and thanks for the information.
The form is being loaded in the background. It's just when the merge tries
to merge the fields from the access database query, it's prompting for the
information that the query needs to pull back the record and merge it. If I
run the access form it will open up the form in the background which still
produces the error. My handicap is not knowing how inside of word, you can
tell it to get the information from the access query. I think this is where
the problem lies.
> > "Opening this document will run the following SQL command. Select * from
> > [ClaimsQuery]. Data from the database will be placed in the document, do
[quoted text clipped - 55 lines]
> >
> > Any help or ideas would be greatly appreciated and welcomed.
Peter Jamieson - 17 Nov 2006 22:00 GMT
What is the Query's SQL?
- you should be able to dig this out from Access somewhere, but you may be
able to see what /Word/ thinks the SQL is by going into the Word VBA
editor, finding the "immediate" panel, and issuing
print ActiveDocument.MailMerge.DataSource.QueryString
Peter Jamieson
> Hi and thanks for the information.
>
[quoted text clipped - 87 lines]
>> >
>> > Any help or ideas would be greatly appreciated and welcomed.
Technojunkie - 21 Nov 2006 21:23 GMT
OK, I think I have the culpret involved. When I click to have the data
merged into a word document, I get the SQL message about merging data into
word. When I click yes to do this, something strange happens. When I press
the merge button the form is already open in the background and the access
query criteria is to pull ALL information from one table based on a certain
field criteria in the form that is open in the background. After the process
takes place, word wants to open multiple copies of access, instead of
utilizing the form and the database that are already opened up.
I have re-established the links from the query to the table fields, checked
the SQL information inside of word to make sure everything is right for the
query and basically gone through with a comb trying to find out the issue.
My question is - Why is word opening multiple instances of access when the
query is initiated and how can this be checked and resolved?
> What is the Query's SQL?
>
[quoted text clipped - 96 lines]
> >> >
> >> > Any help or ideas would be greatly appreciated and welcomed.
Peter Jamieson - 04 Dec 2006 11:45 GMT
Sorry, missed this one.
> My question is - Why is word opening multiple instances of access when the
> query is initiated and how can this be checked and resolved?
I don't know for sure and so far I haven't tried to replicate your findings,
but the first place I would look is the following KB article:
http://support.microsoft.com/kb/224697/en-us
Peter Jamieson
> OK, I think I have the culpret involved. When I click to have the data
> merged into a word document, I get the SQL message about merging data into
[quoted text clipped - 134 lines]
>> >> >
>> >> > Any help or ideas would be greatly appreciated and welcomed.