Hi Albert
My database is set up so that the user enters data into one form (i.e.,
Patient Details), then clicks a command button to enter data into another
form (i.e., Operation Details). Your command button is placed on the second
form, "Operation Details".
I have noticed that when I click the modify button, the data source for the
template reverts back to the underlying table of the active form (i.e., the
underlying table for Operation Details form). However, the data source
(i.e., the query on which my report is based) remains stable if I don't
modify the table.
Could the set up of my database cause the problem with merging, sending all
records to Word instead of just one???
Anthony
Albert D. Kallal said:
Great stuff here!
When moving between forms, I have been using the following line
stLinkCriteria in the "Open Form" command to get to the record for a
particular patient:
stLinkCriteria = "[PatientID]=" & Me![PatientID]
I tried incorporating this into your module that opens the "GuiWordTemplate"
form, but it seemed to choke on "Me". Any suggestions?
Hum, should be able to use MergeSingeWord when talking about a regular bound
form. My code is supposed to only merge ONE record, the one you are looking
at.
That single command should just give you ONE merge record.
MergeSingleWord
If the above command is merging all records, it is possible the data source
for the template got mixed up. Try hitting the modify template button, and
then save the template. Now try the merge. I should give just the one
record. If you copy templates into the diredclity, remmber to hit the
"modify" buttion, as this will fix the data souce for the reocrds.
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn