Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 11-16-2020, 03:17 PM
SQUiD SQUiD is offline Mail Merge - Multiple Sources Windows 10 Mail Merge - Multiple Sources Office 2019
Novice
Mail Merge - Multiple Sources
 
Join Date: Nov 2020
Posts: 6
SQUiD is on a distinguished road
Default

Quote:
Originally Posted by SQUiD View Post
Hopefully I haven't caused confusion.


The first source is a database (I just extracted as a spreadsheet to show the field names) and the secondary source is an excel spreadsheet.


{DATABASE \d "\\\Nas\\13 Test\\External Plant Hire v2.1.accdb" \s " SELECT `HireID` AS `Hire Reference` FROM `qryConfirmationOrderExport` WHERE [ID] = {MERGEFIELD ID}" \l "15" \b "49" \h}


^ Just testing with pulling one field currently to ensure it works before pulling others, I experience an error with the WHERE component, I'm unsure what to specify exactly.


Thanks for your patience

An update after playing around a little, this returns results -


{DATABASE \d "\\\Nas\\13 Test\\External Plant Hire v2.1.accdb" \s " SELECT `HireID` AS `Hire Reference` FROM `qryConfirmationOrderExport` WHERE `HireID` = 4" \l "15" \b "49" \h}


However:
* After every refresh I have to select the database source for each field;
* With the WHERE field, can I have a wild card instead of a specific reference; and
* Is there a string I can use to allow the field code to be nested within an existing table - I don't need it to create its own table, just the content.

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge with 2 sources Marcia Mail Merge 3 07-04-2020 09:38 PM
Mail merge - data sources Sarki76 Mail Merge 2 09-02-2019 01:28 AM
Mail Merge - Multiple Sources Mail Merge Student Transcript - Multiple Years from multiple sheets aizah2018 Mail Merge 1 11-11-2018 01:27 AM
Choosing Mail Merge templates and excel Data Sources using drop downs dushan997 Mail Merge 3 08-04-2017 07:54 PM
Mail Merge to multiple employees in multiple locations as PDF by location GFiz Mail Merge 1 05-13-2017 08:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft