Can the value of an Access 2000 field determine which particular merge document should be used?

L

L. T. Portella

Can the value of an Access 2000 field determine which particular merge
document should be used?

An Access 2000 table has a field which could have a value from 1 to 20.
Depending on the value say if it is one then the mail merge should be done
with Document 1. If the value is 2 then the merge document should be
document 2 etc. Can this be done without coding? If not, will the coding be
difficult? Thank you.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

No, you would need some coding to accomplish this. Here's portion of some
code in one of my Access applications that creates a document based on the
template selected in a combobox control on an access form that has the name
of cmbTemplate:

Dim WordApp As Object
Dim WordDoc As Object
Dim strtemplate As String

On Error GoTo CreateWordApp
Set WordApp = GetObject(, "Word.Application")
On Error GoTo 0
strtemplate = Me.cmbTemplate.Text
'Create a new document from the template
Set WordDoc = WordApp.Documents.Add(strtemplate)
WordApp.Visible = True

CreateWordApp:

Set WordApp = CreateObject("Word.Application")
Resume Next

End Sub

For specific help with coding Access forms, post to
microsoft.public.access.forms.coding
--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
G

Graham Mayor

No, but you could use a series of conditional fields to place the required
text in the one document, based on the content of a field or fields.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
L

L. T. Portella

thank you Doug. I will go to microsoft.public.access.forms.coding
"Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top