S
smcgrath via AccessMonster.com
I found Kallal's Super Easy Word Merge and got it to work on my main form -
nor I would like to place a command button on my subform and have it merge
with that data - I found this code but I am a real novice at how to determine
what to do with it. Does the whole code go on the on click event of the
button?
If you need to restrict the merge to a particular sub-form record, then
place the merge button on that sub-form, and go:
dim strMySql as string
strMySql = "select * from MyWayCoolQueryWithAllFields where ChildID = " &
me!ChildID
This would be mine:
strMySql = "select" from NewDischargeQry where DischargeID = & me!DischargeID
MergeAllWord strMySql
So, the above sql string would restrict the query to the ONE child record.
But, of course that child record will still include all of the main forms
fields. I don't think I saw your other post, but you not explained *how* you
plan to choose (select) which child record to be included in the merge?
nor I would like to place a command button on my subform and have it merge
with that data - I found this code but I am a real novice at how to determine
what to do with it. Does the whole code go on the on click event of the
button?
If you need to restrict the merge to a particular sub-form record, then
place the merge button on that sub-form, and go:
dim strMySql as string
strMySql = "select * from MyWayCoolQueryWithAllFields where ChildID = " &
me!ChildID
This would be mine:
strMySql = "select" from NewDischargeQry where DischargeID = & me!DischargeID
MergeAllWord strMySql
So, the above sql string would restrict the query to the ONE child record.
But, of course that child record will still include all of the main forms
fields. I don't think I saw your other post, but you not explained *how* you
plan to choose (select) which child record to be included in the merge?