View Single Post
 
Old 11-16-2020, 03:17 PM
SQUiD SQUiD is offline Windows 10 Office 2019
Novice
 
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