View Single Post
 
Old 04-04-2022, 10:26 AM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,138
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

This is your field.
{DATABASE \d "{FILENAME \p}/../list.xlsx" \s " SELECT Format([Period], 'MMM-YYYY') AS `Period`, [Type] AS `Type`, Format([claimed],'£#,##0') AS `claimed`, Format([Paid],'£#,##0') AS `Paid`, Format([fine 50%],'£#,##0') AS `fine 50%`, Format([Penalties 10%],'£#,##0') AS `Penalties 10%`, Format([Fixed fine],'£#,##0') AS `Fixed fine`, Format([Penalties pid],'£#,##0') AS `Penalties pid` , Format([Total to be paid],'£#,##0') AS `Total claim` , Format([Interests],' DD-MMM-YY ') AS `Interests` FROM [Invoices$] WHERE [name] = '{ MERGEFIELD name }' ORDER BY [Period]" \l "23" \b "1087" \h}

(screenshot)
00 deleteme 9.png


I have no problem connecting the source file but it does not interpret in your field.

Someone here with more experience with using the DATABASE field may be able to help.

I am moving your question to the Mail Merge Forum. https://www.msofficeforums.com/mail-merge/
Reply With Quote