View Single Post
 
Old 06-24-2021, 04:13 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Since your {MERGEFIELD producentid} outputs a number, you need to enclose it in tick marks:
{DATABASE \d "{FILENAME \p}/../factuur.xlsx" \s "SELECT [ean], [rate], [count], [market], [deposit], [pb], [vat], [amount] FROM [overview$] WHERE [producentid] = '{MERGEFIELD producentid}' ORDER BY [amount]" \l "15" \b "49" \h}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]