Hi, I'm looking for some help on the following:


I am using .FormFields to fill a quotation template in Word, but the subform I am retrieving the data from has rows of records under each column and I need to send more than just the first row to fill the required bookmarks in Word.

The code i'm using is:

Code:
Set doc = appWord.Documents.Open("S:\Templates\Quotation Template - Test.doc", , True)
With doc
.FormFields("FirstName").Result = Me!FirstName
.FormFields("FirstName2").Result = Me!FirstName
.FormFields("LastName").Result = Me!LastName
.FormFields("LastName2").Result = Me!LastName
.FormFields("CompanyName").Result = Me!CompanyName
.FormFields("CompanyName2").Result = Me!CompanyName
.FormFields("Address1").Result = Me!Address1
.FormFields("Address1_2").Result = Me!Address1
.FormFields("Address2").Result = Me!Address2
.FormFields("Address2_2").Result = Me!Address2
.FormFields("Address3").Result = Me!Address3
.FormFields("Address3_2").Result = Me!Address3
.FormFields("fldRegion").Result = Me!Region
.FormFields("PostalCode").Result = Me!PostalCode
.FormFields("PostalCode2").Result = Me!PostalCode
.FormFields("emailname").Result = Me!EmailName
.FormFields("emailname2").Result = Me!EmailName
.FormFields("QuoteReference").Result = Me!QuoteReference
.FormFields("QuoteReference2").Result = Me!QuoteReference
.FormFields("QuoteProjectName").Result = Me!QuoteProjectName
.FormFields("QuoteProjectName2").Result = Me!QuoteProjectName
.FormFields("QuoteDate").Result = Me!QuoteDate
.FormFields("QuoteDate2").Result = Me!QuoteDate
.FormFields("txtVatValue").Result = Me!txtVatValue
.FormFields("txtTotal").Result = Me!txtTotal
.FormFields("txtSubTotal").Result = Me!txtSubTotal
.FormFields("cmbStaff").Result = Me!cmbStaff
 
.FormFields("ProductID").Result = Me.[frmQuotesSub].Form.[ProductID]
.FormFields("Qty").Result = Me.[frmQuotesSub].Form.[Qty]
.FormFields("UnitPrice").Result = Me.[frmQuotesSub].Form.[UnitPrice]
.FormFields("ExtendedPrice").Result = Me.[frmQuotesSub].Form.[ExtendedPrice]
Click image for larger version. 

Name:	Form.JPG 
Views:	1 
Size:	51.0 KB 
ID:	16145
Click image for larger version. 

Name:	WordForm.JPG 
Views:	1 
Size:	98.1 KB 
ID:	16146

A quotation is made in access as shown on screenshot 1. The data on this form then fills bookmarks in Word shown on screenshot 2. The quotes can contain more than one product ID (I've shown 2 in the list). When i export this to Word it fills only the first column of my table. I need to specify on the FormFill to retrieve data from the second row (record 2) to be able to fill the second column in my Word template.

Many thanks!