C
Colin Foster
Hi,
I've managed to get Access to send information directly to a Word document
filling in the necessary fields in the Word document as necessary (aren't
bookmarks wonderful!!).
Anyway, whilst that has worked perfectly well where there is only one result
that can appear in a field, I've come to an abrupt halt where there is more
than one option and I need to select a specific record that matches a set
criteria.
For example.. in TblContractors,
Contact 1 is an Architect
Contact 2 is a Builder
Both of these can appear within the same "contact" field within the access
database, so I have used "Contact" and "Type" to allow each to be shown. The
bit that I am struggling with is the syntax to allow me to put the Architect
in the Architects field within the word document and the Builder in the
Builder field.
I realise that I need to use something along the lines of
SELECT TblContractors.Type FROM TblContractors WHERE
(((TblContractors.Type)="Architect"));
However, how do I translate this to allow the selection from the contractors
form?
At the moment, I'm using...
.ActiveDocument.Bookmarks("Architect").Select
.Selection.Text = (CStr(Me.CustName))
and would like to have my "where" clause on the same line as the
..Selection.Text.
ANy suggestions?
I've managed to get Access to send information directly to a Word document
filling in the necessary fields in the Word document as necessary (aren't
bookmarks wonderful!!).
Anyway, whilst that has worked perfectly well where there is only one result
that can appear in a field, I've come to an abrupt halt where there is more
than one option and I need to select a specific record that matches a set
criteria.
For example.. in TblContractors,
Contact 1 is an Architect
Contact 2 is a Builder
Both of these can appear within the same "contact" field within the access
database, so I have used "Contact" and "Type" to allow each to be shown. The
bit that I am struggling with is the syntax to allow me to put the Architect
in the Architects field within the word document and the Builder in the
Builder field.
I realise that I need to use something along the lines of
SELECT TblContractors.Type FROM TblContractors WHERE
(((TblContractors.Type)="Architect"));
However, how do I translate this to allow the selection from the contractors
form?
At the moment, I'm using...
.ActiveDocument.Bookmarks("Architect").Select
.Selection.Text = (CStr(Me.CustName))
and would like to have my "where" clause on the same line as the
..Selection.Text.
ANy suggestions?