J
John Keith
I am about to redo a procedure that will control a mail merge.
My current process requires that the AccessDB is closed. This is the
process now:
1) Data exists an access table that represents children in a household.
2) The assumption is made that the youngest child stores the most current
mailing address and parent's names. A form/sub-form process allows viewing
all children in a selected household as well as updating the address
information.
3) A button on the main menu starts the mail-merge. It runs a Make Table
query that generates the data necessary for the household. Then launches the
Word document that has the connection to the table as a datasource.
This process launches Word, but the datasource table link is not active. If
Access is closed; with the saved table data... THEN the word document is
launched, All is well and the mailmerge can proceed as normal.
Is there an alternative that will allow Word to read from an open accessDB's
table? Perhaps some kind of "Commit" changes needs to be done?
--otherwise--
I am thinking that the following changes would solve the problem and I'd
like to get some pointers from the community before diving in.
Proposed changes to the process:
1) In the command button routine, after the DoCmd.OpenQuery
"Z_MailMergeTable" statement...
Add code that will export the table to a seperate database file. Then the
execution continues and opens the Word mailmerge doc.
2) Change the Word doc to use the new database-table as the datasource.
Will there be any timing issues? (How do I make sure that the export has
finished before the code launches word)... For i = 1 to 100000000: next i <-
just seems unreliable.
My current process requires that the AccessDB is closed. This is the
process now:
1) Data exists an access table that represents children in a household.
2) The assumption is made that the youngest child stores the most current
mailing address and parent's names. A form/sub-form process allows viewing
all children in a selected household as well as updating the address
information.
3) A button on the main menu starts the mail-merge. It runs a Make Table
query that generates the data necessary for the household. Then launches the
Word document that has the connection to the table as a datasource.
This process launches Word, but the datasource table link is not active. If
Access is closed; with the saved table data... THEN the word document is
launched, All is well and the mailmerge can proceed as normal.
Is there an alternative that will allow Word to read from an open accessDB's
table? Perhaps some kind of "Commit" changes needs to be done?
--otherwise--
I am thinking that the following changes would solve the problem and I'd
like to get some pointers from the community before diving in.
Proposed changes to the process:
1) In the command button routine, after the DoCmd.OpenQuery
"Z_MailMergeTable" statement...
Add code that will export the table to a seperate database file. Then the
execution continues and opens the Word mailmerge doc.
2) Change the Word doc to use the new database-table as the datasource.
Will there be any timing issues? (How do I make sure that the export has
finished before the code launches word)... For i = 1 to 100000000: next i <-
just seems unreliable.