View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Technojunkie Technojunkie is offline
external usenet poster
 
Posts: 6
Default Merging data from Access Query

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.

"Peter Jamieson" wrote:

"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
"Technojunkie" wrote in message
...
Hello:

I have this document that is supposed to populate certain fields in a
word document from an access database. I'll try to explain this the best
I
can.
I've never dealt with populating fields in word only mail merging, so I
don't know where to begin inside word.

The process starts in an access database. I don't think there is
anything wrong with the query or the form, rather inside word the way that
it
tries to merge the access data from the query. I can run the query inside
access and it pulls the information back just fine. Here's what happens
on
the word side.
I open the access database and have a form called letterpopup. Inside
the form is a merge button to merge fields into a word document.
If the form is CLOSED I get prompted for the parameter value. If the form
is OPEN, everything works fine.

When I try to merge, I get the following messages:

"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 ?" If I click yes, I'm prompted to enter the
parameter
value to continue, If the form is CLOSED. If the form is OPEN, everything
works fine.

I've checked the query and the paramater that is supposed to pass to
the word document isn't checked, so it should pass it without getting
prompted for it. Also in the Criteria section of the query is the proper
information.

How do I check inside of the word document to see how it passes or
processes
the and merge the information?

Any help or ideas would be greatly appreciated and welcomed.