You mean you are only merging one main record at a time? In that case, why do you need to use both MailMerge AND bookmarks? I was assuming you were merging multiple "Improvement" records, and for each of these you needed to insert multiple "NonCompliance" records.
For a single record merge, you could use only bookmarks. It appears that your code is already doing this successfully without using a mail merge at all. Lines 22-26 are inserting fields from the parent record, and lines 29-37 are inserting the child NonCompliance records.
There is yet another approach which would work for you because the NonCompliance list is a simple list, not one that needs inserting into a table. The trick is to use a function to assemble a delimited list of child records as a field in your query. Then it can be treated as a single merge field.
Attached is a function named DelimitedList.
In the query that you are using for your mail merge, add the following field:
ImprovementList: DelimitedList( "Select * From NonCompliance Where [Improvement Notice ID] = " &
[Improvement_Notice_ID], "NonCompliance", Chr(13) )
This will create a string of all the NonCompliance values matching the given [Improvement Notice ID], and separated by vbCr characters. This can be used as a merge field and no bookmarks are required at all.
--
Graham