JMP support guys did respond but it was in my junk box.
They suggested just as you mentioned, and it worked just fine.
Pasting their detailed feedback for everyone's benefit:
================================================================================================
Sending the <<Run message to New SQL Query() causes JMP to use the Query Builder preference for running queries. Unless you have updated your preferences, SQL Queries are run in the background by default.
<![if !vml]>
<![endif]>
Use <<Run Foreground with the OnRunComplete option to assign a reference to the imported table. This will cause your script to wait for the query to complete. Additionally, Query Builder creates a symbol that is only available to the OnRunComplete() script called 'queryResult.' This symbol is a reference to the resulting table.
<< Run Foreground( On Run Complete( dt = queryResult ) );
You can read more about the available functions and their arguments the the SQL Functions section of the JSL Syntax Reference.
================================================================================================
So in application:
dtqProperties = (New SQL Query(
Version( 130 ),
Connection(
"ODBC:DBQ=C:\Users\E822710\Desktop\ROTF\Database For JMP\Results.Mdb;DefaultDir=C:\Users\E822710\Desktop\ROTF\Database For JMP;Driver={Microsoft Access Driver (*.mdb, *.accdb)};DriverId=25;FIL=MS Access;FILEDSN=C:\Users\E822710\Desktop\ROTF\Database For JMP\Results.Mdb.dsn;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;"
),
QueryName( "qProperties" ),
Select(
Column( "CaseID", "t1", Analysis Type( "Nominal" ) ),
Column( "StreamID", "t1", Analysis Type( "Nominal" ) ),
Column( "StreamTag", "t1" ),
Column( "StreamDescription", "t1" ),
Column( "QualityID", "t1", Analysis Type( "Nominal" ) ),
Column( "QualityTag", "t1" ),
Column( "QualityDescription", "t1" ),
Column( "Value", "t1", Alias( "StreamQualityValue" ) ),
Column( "OriginDescription", "t1", Alias( "StreamOriginDescription" ) )
),
From( Table( "RW_StreamQualities", Alias( "t1" ) ) ),
Where(
In List(
Column( "QualityTag", "t1" ),
{"CRB"},
UI( SelectListFilter( ListBox, Base( "Categorical" ) ) )
)
),
Order By(
Column( "CaseID", "t1", Order( "Ascending" ) ),
Column( "StreamReportOrder", "t1", Order( "Ascending" ) ),
Column( "QualityReportOrder", "t1", Order( "Ascending" ) )
)
) << Run Foreground( On Run Complete( dt = queryResult ) ));
JRS