Reply
 
Thread Tools Display Modes
  #1   Report Post  
Brian Alley
 
Posts: n/a
Default Mail Merge not running properly from Access Function but runs properly when opened manually

Here's the deal:
All of this is using the Office 2000 Suite.
We've got an Access db in which we've got a button setup to open a
particular document in Word and populate the Word document with information
from a query contained in the db.

Once the document opens, the access query runs and populates the document
via Mail Merge. The problem lies in that when you use the button to open
the document, the results of the query aren't "refreshed" into the document.
(It pulls old data - one record set in particular over and over and over
again). If you go and look at where it's pulling the information from in
Access, the record set that the document is referring to isn't listed. We
have a query setup to pull the desired information and the Word document
just looks at the qry when it opens. If you look at the qry results before
opening the document via the button, it contains the current information.

If, however, you go and manually open the document, you get an alert that
the query needs to run for proper use of the document. After allowing the
document to run the query, the document is then properly populated with the
correct information.

I've gone around and around. From what I can tell, the problem lies in the
word document as we're simply calling a function to open the document with
the desired filename. The qry is pulling the correct info before and after
opening the document - its just that the document isn't populating itself w/
the query results when its opened via the code in access.

Thanks for the help!




  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

I'd guess that there is something wrong with your Access procedure.

Take a look at the "Super easy Word merge" item on fellow MVP Albert
Kallal's website at:

http://www.attcanada.net/~kallal.msn.../msaccess.html



--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Brian Alley" BAlley atctsinetdotcom wrote in message
...
Here's the deal:
All of this is using the Office 2000 Suite.
We've got an Access db in which we've got a button setup to open a
particular document in Word and populate the Word document with
information from a query contained in the db.

Once the document opens, the access query runs and populates the document
via Mail Merge. The problem lies in that when you use the button to open
the document, the results of the query aren't "refreshed" into the
document. (It pulls old data - one record set in particular over and over
and over again). If you go and look at where it's pulling the information
from in Access, the record set that the document is referring to isn't
listed. We have a query setup to pull the desired information and the
Word document just looks at the qry when it opens. If you look at the qry
results before opening the document via the button, it contains the
current information.

If, however, you go and manually open the document, you get an alert that
the query needs to run for proper use of the document. After allowing the
document to run the query, the document is then properly populated with
the correct information.

I've gone around and around. From what I can tell, the problem lies in the
word document as we're simply calling a function to open the document with
the desired filename. The qry is pulling the correct info before and
after opening the document - its just that the document isn't populating
itself w/ the query results when its opened via the code in access.

Thanks for the help!






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge not working properly Diane Hazen Mailmerge 10 August 22nd 05 07:58 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Web-Site-based Word Mail Merge & Access DB Alex Maghen Mailmerge 3 January 17th 05 10:52 PM
mail merge and access query DaveAS Mailmerge 6 January 6th 05 07:33 PM
Word mail merge with Access Linda Mailmerge 1 December 8th 04 12:46 AM


All times are GMT +1. The time now is 01:04 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"