crystalnewbie
MIS
I've created a command button on a form that calls a word document to do a mail merge. It runs a query and uses the value of an ID field in the form as the query parameter.
When the mail merge runs, the normal parameter window pops up asking for input. How can I prevent this? Why is it not using the criterion value that I am using on the query?
On my query, the criteria is set to:
[Forms]![Donor tbl]![Donation Detail tbl Subform].[Form]![Donor Number]
Is there anything i can add to the statement below to have the query use the criteria above?
objDoc.MailMerge.OpenDataSource _
Name:="\\pc1\c$\donor.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY qryDonor Receipt", _
SQLStatement:="Select * from 'qryDonor Receipt'"
Thanks in advance.
When the mail merge runs, the normal parameter window pops up asking for input. How can I prevent this? Why is it not using the criterion value that I am using on the query?
On my query, the criteria is set to:
[Forms]![Donor tbl]![Donation Detail tbl Subform].[Form]![Donor Number]
Is there anything i can add to the statement below to have the query use the criteria above?
objDoc.MailMerge.OpenDataSource _
Name:="\\pc1\c$\donor.mdb", _
LinkToSource:=True, AddToRecentFiles:=False, _
Connection:="QUERY qryDonor Receipt", _
SQLStatement:="Select * from 'qryDonor Receipt'"
Thanks in advance.