Hello All and thankyou for taking the time to read.
I have been using vb to take entries from a form and populate a bookmarked (pre prepared) document(template) and thanks to some advice on here and learning as I go it has been very sucessful, so far.
I am now stepping up a gear and want to take a form that has several records on it, from an underlying table and populate a (word) document but the table is already in the document and i just want to populate it in as many rows as needed to take all the entries from my (access) form.
The code I am used to using is pretty standard using the bookmarks property as follows
As you see I have used (for this simple 'one record' form) entries from text boxes as values and results of dlookup entries.
I will leave it up to your capable minds as to how much assistance you can offer. Please be gentle with me as I am trying to walk before I run, hence the reason I have cut out the rest of my 'nightmare' code.
Many Thanks in anticipation.
Dave
I have been using vb to take entries from a form and populate a bookmarked (pre prepared) document(template) and thanks to some advice on here and learning as I go it has been very sucessful, so far.
I am now stepping up a gear and want to take a form that has several records on it, from an underlying table and populate a (word) document but the table is already in the document and i just want to populate it in as many rows as needed to take all the entries from my (access) form.
The code I am used to using is pretty standard using the bookmarks property as follows
Code:
---cut---
strTaskNo = Me.TaskNo
strTaskMan = DLookup("[surnameInits]", "qryPersNameInits", "[persID] = " & Forms!frmtaskEntry.PersIDTaskMan)
----cut---------------
With Wrd.ActiveDocument.Bookmarks
.Item("taskman").Range.Text = strTaskMan
.Item("taskno").Range.Text = strTaskNo '
.Item("MDD_ID").Range.Text = strMDD_ID '
.Item("MDD_Title").Range.Text = strMDD_Title
As you see I have used (for this simple 'one record' form) entries from text boxes as values and results of dlookup entries.
I will leave it up to your capable minds as to how much assistance you can offer. Please be gentle with me as I am trying to walk before I run, hence the reason I have cut out the rest of my 'nightmare' code.
Many Thanks in anticipation.
Dave