Dlookup on mail merge

T

Tony Williams

I have a mail merge letter that is linked to an Access database table. I can
map most fields that I need but some of the fields I want would be DLookup
fields if I was creating an Access report. How do I do DLookup formulas in a
Word document?
Thanks
Tony
 
T

Tony Williams

having Googled my question I've come up with this but it doesn't work I get
#Error

=DLookUp("[txtmemnumber]","[tblindividual]","[txtsurname]=Forms!frmMain!Subform1!frmLevymembersubform![cmbname.Column(1)]
&
[txtfirstname]=Forms!frmMain!Subform1!frmLevymembersubform![cmbname.Column(2)]")
 
T

Tony Williams

Sorry this was the wrong post it was meant for another Group! I still have
the problem!
Thanks
Tony

Tony Williams said:
having Googled my question I've come up with this but it doesn't work I get
#Error

=DLookUp("[txtmemnumber]","[tblindividual]","[txtsurname]=Forms!frmMain!Subform1!frmLevymembersubform![cmbname.Column(1)]
&
[txtfirstname]=Forms!frmMain!Subform1!frmLevymembersubform![cmbname.Column(2)]")

Tony Williams said:
I have a mail merge letter that is linked to an Access database table. I can
map most fields that I need but some of the fields I want would be DLookup
fields if I was creating an Access report. How do I do DLookup formulas in a
Word document?
Thanks
Tony
 
D

Doug Robbins - Word MVP

Use a query in Access as the data source.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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